IOS 3.0之后,navigation controller内置toolbar
表明toolbar及其toolbar基本上的设定编码以下:
[self.navigationController setToolbarHidden:NO animated:NO];
self.navigationController.toolbar.barStyle = UIBarStyleBlack;
UIBarButtonItem *item = [[UIBarButtonItem alloc] initWithBarButtonSystemItem: UIBarButtonSystemItemCompose target:self action:@selector(settingButtonClicked)];
NSArray *myToolbarItems = [[NSArray alloc] initWithObjects: item, nil];
[self setToolbarItems: myToolbarItems animated:YES];
toolbar的掩藏:
NewOrderViewController *newOrder = [[NewOrderViewController alloc] initWithNibName:@"NewOrderView" bundle:[NSBundle mainBundle]];
newOrder.hidesBottomBarWhenPushed = YES;
[self.navigationController pushViewController:newOrder animated:YES];