导航栏常用代码
来源:互联网 发布:linux top 参数 编辑:程序博客网 时间:2024/04/27 22:57
//iOS7 修改导航条背景色
[[UINavigationBar appearance] setBarTintColor:UIColorFromRGB(0x067AB5)];
//iOS7 修改导航条上面返回按钮标题颜色,如果不修改返回的indicator <也是这样颜色
[[UINavigationBar appearance] setTintColor:[UIColor redColor]];
//自定义导航条背景图片
[[UINavigationBar appearance] setBackgroundImage:[UIImage imageNamed:@"nav_bg_ios7.png"] forBarMetrics:UIBarMetricsDefault];
//iOS7 自定义返回文字左边的indicator图标 即<
[[UINavigationBar appearance] setBackIndicatorImage:[UIImage imageNamed:@"back_btn.png"]];
[[UINavigationBar appearance] setBackIndicatorTransitionMaskImage:[UIImage imageNamed:@"back_btn.png"]];
//自定义导航条的标题样式
NSShadow *shadow = [[NSShadow alloc] init];
shadow.shadowColor = [UIColor colorWithRed:0.0 green:1.0 blue:0.0 alpha:0.8];
shadow.shadowOffset = CGSizeMake(1, 1);//x:左右偏移量,左﹣右+;y:上下偏移量,上-下+
shadow.shadowBlurRadius = 200;
[[UINavigationBar appearance] setTitleTextAttributes: [NSDictionary dictionaryWithObjectsAndKeys:
[UIColor colorWithRed:245.0/255.0 green:245.0/255.0 blue:245.0/255.0 alpha:1.0], NSForegroundColorAttributeName,
shadow, NSShadowAttributeName,
[UIFont fontWithName:@"HelveticaNeue-CondensedBlack" size:21.0], NSFontAttributeName, nil]];
self.navigationItem.prompt =@"This is a prompt";
- 导航栏常用代码
- 导航栏常用代码
- 精品导航栏代码
- CSS导航栏代码
- 代码自定义导航栏
- 导航控制器 导航栏主题设置代码
- Bootstrap常用的导航栏
- 经典导航栏按钮代码
- 纯代码创建导航栏
- iOS导航栏透明代码
- 常用导航
- Bootstrap多级导航栏(级联导航)的实现代码
- iOS - 导航栏UINavigationController常用属性
- iOS开发导航栏常用属性
- iOS 10导航栏常用属性设置
- 常用的导航栏下划线滚动特效
- html页面导航栏javascript代码
- 固定导航栏css样式待代码
- 2014最赚钱项目 加值电话设备
- spring依赖注入枚举类型
- c、c++ 结构体的嵌套
- 2014做什么赚钱 吸费电话代理
- hihocoder:数字三角形
- 导航栏常用代码
- 回拨吸费电话 打工不如创业 加值电话平台
- ASP.NET程序中常用的代码
- 用户抓log引导!请仔细观看哈~
- 供应电话吸费项目 让您轻松赚钱
- html基础知识
- 拓扑排序
- HDU 2090 算菜价
- UIView之exclusiveTouch、clipsToBounds、transform属性