在自定义的UINavigationController中设置背景图片
2015-11-12 09:44
441 查看
//这个方法中设置
+ (void)initialize
{
UINavigationBar *bar = [UINavigationBar appearance];
[bar setBackgroundImage:[UIImage imageNamed:@"bg_navigationBar_normal"] forBarMetrics:UIBarMetricsDefault];
}
- (void)viewDidLoad {
[super viewDidLoad];
// Do any additional setup after loading the view.
}
- (void)didReceiveMemoryWarning {
[super didReceiveMemoryWarning];
// Dispose of any resources that can be recreated.
}
+ (void)initialize
{
UINavigationBar *bar = [UINavigationBar appearance];
[bar setBackgroundImage:[UIImage imageNamed:@"bg_navigationBar_normal"] forBarMetrics:UIBarMetricsDefault];
}
- (void)viewDidLoad {
[super viewDidLoad];
// Do any additional setup after loading the view.
}
- (void)didReceiveMemoryWarning {
[super didReceiveMemoryWarning];
// Dispose of any resources that can be recreated.
}
相关文章推荐
- 开发kendo-ui弹窗组件
- [sicily]1209. Sequence Sum Possibi
- Fatal error: The slave I/O thread stops because master and slave have equal MySQL server UUIDs
- 普林斯顿大学算法第一部分学习总结(Week4-Priority Queue)
- ——黑马程序员——OC中NSNumber、NSValue、NSDate 的使用总结
- Longest Increasing Subsequence
- Range Sum Query - Immutable leetcode 303
- UI 和 UIView
- 使用 Build.VERSION.SDK_INT兼容不同版本的API
- 我的前端故事----疯狂倒计时(requestAnimationFrame)
- 个人信用卡管理 - iOS UI原型
- Android更新UI的两种方法
- UICollectonView
- [非凡程序员]uitableview uiimage 的手动编写 加密
- UIKit 手写控件 UIImageView 和UITableView
- UICollectionView
- iOS7 UITabBar自定义选中图片显示为默认蓝色的Bug
- IOS UIAlertController 弹出框中添加视图(例如日期选择器等等)
- UI基础知识 -- UITextView UIButton
- UVA 12166 Equilibrium Mobile(贪心,反演)