BKTabBarController 该框架是一个TabBarController底部菜单中心控制器

网友投稿 606 2022-10-30

BKTabBarController 该框架是一个TabBarController底部菜单中心控制器

BKTabBarController 该框架是一个TabBarController底部菜单中心控制器

BKTabBarController

本框架是一个TabBarController底部菜单中心控制器.本框架在原UI TabBarController基本上添加了中心控制按钮,除了切换控制器外,中心控制按钮还能提供其他操作.

实例:

FirstViewController * firstViewCtl = [[FirstViewController alloc] init];SecondViewController * secondViewCtl = [[SecondViewController alloc] init];ThirdViewController * thirdViewCtl = [[ThirdViewController alloc] init];FourthViewController * fourthViewCtl = [[FourthViewController alloc] init];NSArray *arrayOfViewCtl = @[firstViewCtl, secondViewCtl, thirdViewCtl, fourthViewCtl];NSArray *arrayOfTitle = @[@"首页", @"消息", @"发现", @"我的"];NSArray *arrayOfNormalImageName = @[@"tabbar_home",@"tabbar_message_center",@"tabbar_discover",@"tabbar_profile"];NSArray *arrayOfSelectedImageName = @[@"tabbar_home_selected", @"tabbar_message_center_selected", @"tabbar_discover_selected", @"tabbar_profile_selected"];BKTabBarViewController *mainTabBarCtl = [[BKTabBarViewController customTabBarViewController] initWithChildViewControllerArray:arrayOfViewCtl TitleArray:arrayOfTitle ItemNormalImageNameArray:arrayOfNormalImageName ItemSelectedImageNameArray:arrayOfSelectedImageName];[mainTabBarCtl loadTabBarViewControllerMainFunction];__weak typeof(BKTabBarViewController*)weakSelf =mainTabBarCtl;weakSelf.mainTabBarView.blockToCenterButtonAction = ^{ JumpUpViewController *additionalViewCtl = [[JumpUpViewController alloc] init]; additionalViewCtl.modalPresentationStyle=UIModalPresentationOverCurrentContext; [mainTabBarCtl presentViewController:additionalViewCtl animated:YES completion:nil];};[self presentViewController:mainTabBarCtl animated:YES completion:nil];

版权声明:本文内容由网络用户投稿,版权归原作者所有,本站不拥有其著作权,亦不承担相应法律责任。如果您发现本站中有涉嫌抄袭或描述失实的内容,请联系我们jiasou666@gmail.com 处理,核实后本网站将在24小时内删除侵权内容。

上一篇:基于CSS的3D旋转画册的制作
下一篇:jenkins
相关文章

 发表评论

暂时没有评论,来抢沙发吧~