if you want show toolbar in one view controller which placed in some navigation controller.
- select view controller in storyboard
- in utilities, show "attribute inspector". select "bottom bar" style.
- add bar button item
- add code in view controller, to show and hide toolbar:
code:
- (void)viewWillAppear:(BOOL)animated
{
[self.navigationController setToolbarHidden:NO animated:YES];
}
- (void)viewWillDisappear:(BOOL)animated
{
[self.navigationController setToolbarHidden:YES animated:YES];
}
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…