一直觉得自己写的不是技术,而是情怀,一个个的教程是自己这一路走来的痕迹。靠专业技能的成功是最具可复制性的,希望我的这条路能让你们少走弯路,希望我能帮你们抹去知识的蒙尘,希望我能帮你们理清知识的脉络,希望未来技术之巅上有你们也有我。
使用场景:自定义导航栏那跟tarbar在所有的项目中基本能用到的。在项目搭建的时候,比较普片。
使用
self.window = [[UIWindow alloc]initWithFrame:[UIScreen mainScreen].bounds];
FHXTabBarController *tabBarVC = [[FHXTabBarController alloc]init];
[tabBarVC setUpOneChildViewController:[[HomeViewController alloc] init] image:[ChooseTarbarIcon share].home_normal selectedImage:[ChooseTarbarIcon share].home_selected title:[ChooseTarbarIcon share].home_title];
[tabBarVC setUpOneChildViewController:[[CategoryViewController alloc] init] image:[ChooseTarbarIcon share].category_normal selectedImage:[ChooseTarbarIcon share].category_selected title:[ChooseTarbarIcon share].category_title];
[tabBarVC setUpOneChildViewController:[[DiscoverMeunNewVC alloc] init] image:[ChooseTarbarIcon share].discover_normal selectedImage:[ChooseTarbarIcon share].discover_selected title:[ChooseTarbarIcon share].discover_title];
[tabBarVC setUpOneChildViewController:[[ShopCarViewController alloc] init] image:[ChooseTarbarIcon share].shopCar_normal selectedImage:[ChooseTarbarIcon share].shopCar_selected title:[ChooseTarbarIcon share].shopcar_title];
[tabBarVC setUpOneChildViewController:[[UsersCenterViewController alloc] init] image:[ChooseTarbarIcon share].my_normal selectedImage:[ChooseTarbarIcon share].my_selected title:[ChooseTarbarIcon share].my_title];
self.window.rootViewController = tabBarVC;
效果
自定义tarbar
自定义navigation