标签:des style color io for ar cti line size
[self.navigationController.navigationBar setBackgroundImage:imag forBarMetrics:UIBarMetricsDefault];
//button 定义你要的背景 文字 或 事件
UIBarButtonItem *leftBarButton = [[UIBarButtonItem alloc] initWithCustomView:button];
self.navigationItem.leftBarButtonItem = leftBarButton;
[leftBarButton release];
具体实现:
[self.navigationItem setTitle:@"通知详情"];
//self.navigationController.navigationBarHidden = NO;
[self.navigationController.navigationBar setBackgroundImage:[UIImage imageNamed:@"root_top.png"] forBarMetrics:UIBarMetricsDefault];
self.navigationItem.hidesBackButton = YES;
UIButton *rightButton = [[UIButton alloc]initWithFrame:CGRectMake(SCREEN_WIDTH - 70, 10, 70, rootTopHeight - 20)];
[rightButton addTarget:self action:@selector(NoticeBackAction) forControlEvents:UIControlEventTouchUpInside];
[rightButton setBackgroundImage:[UIImage imageNamed:@"root_back.png"] forState:UIControlStateNormal];
[rightButton setTitle:@"退出" forState:UIControlStateNormal];
UIBarButtonItem *rightBarButton = [[UIBarButtonItem alloc]initWithCustomView:rightButton];
self.navigationItem.rightBarButtonItem = rightBarButton;
navigationitem的背景图片和左边返回按钮 以及文字
标签:des style color io for ar cti line size
原文地址:http://blog.csdn.net/huang2009303513/article/details/38758629