- 中间按钮可凸出 (bulge设为YES 否则不突出)
- 中按钮可设置控制器 或 普通按钮 (Controller传入nil为普通按钮)
- 二级页面不再添加tababr
- 小红点提醒 (当前控制器.tabBarItem.badgeValue = @"remind";)
- 数字提醒用户(当前控制器.tabBarItem.badgeValue = @"100";)
- 改变数字提醒背景颜色(当前控制器.tabBarItem.badgeColor = [UIColor xxxColor];)
- 切换控制器 (当前tabBarController.selectedIndex = x(索引为添加控制器时的顺序);)
- 暂不支持CocoaPods
- 手动导入:将项目中的“CYTabBar”文件夹拖入项目中
- 在AppDelegate中导入头文件 "CYTabBarController.h"
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
self.window = [[UIWindow alloc]initWithFrame:[[UIScreen mainScreen]bounds]];
CYTabBarController * tabbar = [[CYTabBarController alloc]init];
[tabbar addChildController:[ViewController new] title:@"xx" imageName:@"xx" selectedImageName:@"xx"];
[tabbar addChildController:[ViewController2 new] title:@"xx" imageName:@"xx" selectedImageName:@"xx"];
[tabbar addCenterController:nil bulge:YES title:@"xx" imageName:@xx" selectedImageName:@"xx"];
self.window.rootViewController = tabbar;
[self.window makeKeyAndVisible];
return YES;
}
- ARC环境. - Requires ARC
- 竖屏. - Vertical Screen
- 2017.03.12 修复tabbar销毁的时候观察者移除问题