UITabBarController和UINavigationController搭配使用
来源:互联网 发布:网络十大奇书排行 编辑:程序博客网 时间:2024/05/17 07:19
self.window = [[UIWindowalloc]initWithFrame:[UIScreenmainScreen].bounds];
ViewController *vc = [[ViewControlleralloc]init];
UINavigationController *nvc = [[UINavigationControlleralloc]initWithRootViewController:vc];
[vc.navigationItemsetTitle:@"第一页"];
[vc.tabBarItemsetTitle:@"Message"];
[vc.tabBarItemsetImage:[UIImageimageNamed:@"message.png"]];
[vc.tabBarItemsetBadgeValue:@"99+"];
//设置字体颜色
[vc.tabBarItemsetTitleTextAttributes:@{NSFontAttributeName:[UIFontsystemFontOfSize:20],NSForegroundColorAttributeName:[UIColorwhiteColor]}forState:UIControlStateNormal];
[vc.tabBarItemsetTitleTextAttributes:@{NSFontAttributeName:[UIFontsystemFontOfSize:20],NSForegroundColorAttributeName:[UIColorblackColor]}forState:UIControlStateHighlighted];
[vc.viewsetBackgroundColor:[UIColorblueColor]];
SecondViewController *svc = [[SecondViewControlleralloc]init];
UINavigationController *snvc = [[UINavigationControlleralloc]initWithRootViewController:svc];
[svc.navigationItemsetTitle:@"第一页"];
[svc.tabBarItemsetTitle:@"Setting"];
[svc.tabBarItemsetImage:[UIImageimageNamed:@"setting.png"]];
[svc.tabBarItemsetBadgeValue:@"999+"];
[svc.viewsetBackgroundColor:[UIColoryellowColor]];
UITabBarController *tb = [[UITabBarControlleralloc]init];
tb.viewControllers =@[nvc,snvc];
[tb.tabBarsetTintColor:[UIColorredColor]];
[tb.tabBarsetBarTintColor:[UIColororangeColor]];
[self.windowsetRootViewController:tb];
[self.windowmakeKeyAndVisible];
- UITabBarController和UINavigationController搭配使用
- UItabBarController和UINavigationController结合使用
- UINavigationController和UITabBarController的组合使用
- UITabBarController和UINavigationController的整合使用
- UI14-UINavigationController和UITabBarController一起使用
- UINavigationController和UITabBarController合用。
- UINavigationController和UITabBarController合用
- UINavigationController和UITabBarController合用。
- 隐藏UINavigationController和UITabBarController
- UITabBarController和UINavigationController混用
- UINavigationController和UITabBarController合用。
- UINavigationController和UITabBarController
- UINavigationController和UITabBarController混用
- 【深入浅出IOS开发】UITabBarController和UINavigationController混合使用
- StoryBoard初探(二):使用UINavigationController和UITabBarController
- 【深入浅出IOS开发】UITabBarController和UINavigationController混合使用
- UITabBarController与UINavigationController配合使用
- UINavigationController与UITabBarController混合使用
- 字节流与字符流的区别详解
- 从零开学FastDFS之一(安装篇)
- jquery.qrcode.min.js生成二维码插件
- 学密码学一定得学程序
- JS 栈和堆的小思考
- UITabBarController和UINavigationController搭配使用
- 【MySQL】 join连接使用基本知识
- Dmaven.multiModuleProjectDirectory system property is not set
- [KMP DP 矩阵快速幂加速] BZOJ 1009 [HNOI2008]GT考试
- poi实现Excel文件读写
- atoi实现,字符串转换成整数
- google protobuf编译安装(ImportError: No module named google.protobuf.internal)
- C#开发-.NET Framework理解
- Android 网络请求:Retrofit 使用