很簡單:
-(void)viewWillAppear:(BOOL)animated
{
[superviewWillAppear:animated];
self.navigationController.toolbarHidden =NO;
}
- (void)viewDidLoad {
[superviewDidLoad];
// Do any additional setup after loading the view.
// self.navigationController.toolbarHidden = NO;
self.view.backgroundColor = [UIColorredColor];
UIBarButtonItem *one = [[UIBarButtonItemalloc] initWithBarButtonSystemItem:UIBarButtonSystemItemAddtarget:nilaction:nil];
UIBarButtonItem *two = [[UIBarButtonItemalloc] initWithBarButtonSystemItem:UIBarButtonSystemItemBookmarkstarget:nilaction:nil];
UIBarButtonItem *three = [[UIBarButtonItemalloc] initWithBarButtonSystemItem:UIBarButtonSystemItemActiontarget:nilaction:nil];
UIBarButtonItem *four = [[UIBarButtonItemalloc] initWithBarButtonSystemItem:UIBarButtonSystemItemEdittarget:nilaction:nil];
UIBarButtonItem *flexItem = [[UIBarButtonItemalloc] initWithBarButtonSystemItem:UIBarButtonSystemItemFlexibleSpacetarget:nilaction:nil];
[selfsetToolbarItems:[NSArrayarrayWithObjects:flexItem, one, flexItem, two, flexItem, three, flexItem, four, flexItem,nil]];
}