bar
- (void)viewDidLoad {
[super viewDidLoad];
//
// self.navigationBar
// self.toolbarItems
//navigationBar
//是否透明
[self.navigationBar setTranslucent:NO];
//底部顏色
[self.navigationBar setTintColor:[UIColor blackColor]];
//顏色
[self.navigationBar setBarTintColor:[UIColor grayColor]];
//設(shè)置背景圖片
[self.navigationBar setBackgroundImage:[UIImage imageNamed:@"header_bg64"] forBarPosition:UIBarPositionAny barMetrics:UIBarMetricsDefault];
//self.toolbarItems
//顯示
self.toolbarHidden = NO;
//是否半透明
self.toolbar.translucent = NO;
//設(shè)置表層顏色
[self.toolbar setBarTintColor:[UIColor blackColor]];
//設(shè)置底層顏色
[self.toolbar setTintColor:[UIColor redColor]];
//設(shè)置圖片
[self.toolbar setBackgroundImage:[UIImage imageNamed:@"navigationbar"] forToolbarPosition:UIBarPositionAny barMetrics:UIBarMetricsDefault];
}
Items
self.navigationItem setTitle:<#(NSString *)#>
self.navigationItem setTitleView:<#(UIView *)#>
UIBarButtonItem *item = [UIBarButtonItem alloc]initWithBarButtonSystemItem:<#(UIBarButtonSystemItem)#> target:<#(id)#> action:<#(SEL)#>
UIBarButtonItem *item = [UIBarButtonItem alloc]initWithImage:<#(UIImage *)#> style:<#(UIBarButtonItemStyle)#> target:<#(id)#> action:<#(SEL)#>
self.navigationItem setLeftBarButtonItem:<#(UIBarButtonItem *)#>}
UIBarButtonItem *item = [UIBarButtonItem alloc]initWithBarButtonSystemItem:<#(UIBarButtonSystemItem)#> target:<#(id)#> action:<#(SEL)#>
//============
// self setToolbarItems:<#(NSArray *)#>