导航栏的一些操作技巧
来源:互联网 发布:java后台权限管理系统 编辑:程序博客网 时间:2024/06/07 01:44
- (void)viewDidLoad {
[super viewDidLoad];
self.navigationBar.barTintColor = [UIColor redColor];
//返回按钮颜色
UIImage *backButtonImage = [[UIImage imageNamed:@"navigator_btn_back"] resizableImageWithCapInsets:UIEdgeInsetsMake(0, 30, 0, 0)];
[[UIBarButtonItem appearance] setBackButtonBackgroundImage:backButtonImage forState:UIControlStateNormal barMetrics:UIBarMetricsDefault];
//这句就是在PUSH出界面的时候去掉文字只显示一个返回按钮
[[UIBarButtonItem appearance] setBackButtonTitlePositionAdjustment:UIOffsetMake(NSIntegerMin, NSIntegerMin) forBarMetrics:UIBarMetricsDefault];
if (self.viewControllers.count) {
viewController.hidesBottomBarWhenPushed = YES;
}
[super pushViewController:viewController animated:animated];
}
/**
* 导航控制器 统一管理状态栏颜色
* @return 状态栏颜色
*/
-(UIStatusBarStyle)preferredStatusBarStyle{
return UIStatusBarStyleLightContent;
[super viewDidLoad];
self.navigationBar.barTintColor = [UIColor redColor];
//返回按钮颜色
UIImage *backButtonImage = [[UIImage imageNamed:@"navigator_btn_back"] resizableImageWithCapInsets:UIEdgeInsetsMake(0, 30, 0, 0)];
[[UIBarButtonItem appearance] setBackButtonBackgroundImage:backButtonImage forState:UIControlStateNormal barMetrics:UIBarMetricsDefault];
//这句就是在PUSH出界面的时候去掉文字只显示一个返回按钮
[[UIBarButtonItem appearance] setBackButtonTitlePositionAdjustment:UIOffsetMake(NSIntegerMin, NSIntegerMin) forBarMetrics:UIBarMetricsDefault];
//导航栏的文字属性
self.navigationBar.tintColor = [UIColor whiteColor];
self.navigationBar.titleTextAttributes = [NSDictionary dictionaryWithObjectsAndKeys:[UIColor whiteColor],NSForegroundColorAttributeName,[UIFont boldSystemFontOfSize:17.0],NSFontAttributeName ,nil];}
//如果有标签栏 每次推出的时候加上这个方法就会隐藏底部的标签栏
if (self.viewControllers.count) {
viewController.hidesBottomBarWhenPushed = YES;
}
[super pushViewController:viewController animated:animated];
}
/**
* 导航控制器 统一管理状态栏颜色
* @return 状态栏颜色
*/
-(UIStatusBarStyle)preferredStatusBarStyle{
return UIStatusBarStyleLightContent;
}
- (void)configureAppearance {
self.window.backgroundColor = [UIColor whiteColor];
// 0x2F434F
[UINavigationBar appearance].barTintColor = [UIColor colorWithRed:(48 - 40) / 215.0 green:(67 - 40) / 215.0 blue:(78 - 40) / 215.0 alpha:1];
[UINavigationBar appearance].barStyle = UIBarStyleBlack;
[UINavigationBar appearance].tintColor = [UIColor whiteColor];
[UISegmentedControl appearance].tintColor = [UIColor whiteColor];
[UITabBar appearance].tintColor = HexRGB(colorI3);
}
0 0
- 导航栏的一些操作技巧
- 设置导航栏的一些技巧
- 关于导航栏设置的一些操作
- MFC 的一些操作技巧
- Win7的一些操作技巧
- 一些JS的操作技巧
- 窗口操作的一些技巧
- 一些位操作的技巧
- Unity3D的一些操作技巧
- MAC的一些操作技巧
- delphi的一些操作技巧
- 导航栏的一些方法
- 升级xCode9 导航栏变化及一些小技巧
- 一些有用的WINDOWS操作技巧
- 关于位操作的一些技巧小结
- Oracle EBS的一些操作技巧
- Oracle EBS的一些操作技巧 收藏
- 高效操作Bash的一些技巧.
- Android 通过Stack管理Activity
- awk-10
- 调度方式
- (4.1.38.1)LoaderManager使用详解(一)---没有Loader之前的世界
- 剑指offer-面试题53:正则表达式匹配
- 导航栏的一些操作技巧
- 连接池c3p0 ,Proxool ,Druid ,Tomcat Jdbc Pool对比测试
- centos7之lamp环境搭建
- 易直播CEO陈建文:“视频+”是未来“互联网+”最重要形态
- iOS跳转App Store应用评论页
- 使用FormData对象提交表单及上传图片
- [BZOJ3781]小B的询问(莫队)
- (4.1.38.2)LoaderManager使用详解(二)---了解LoaderManager
- Android读取本地或者网络图片的方法