I made and implemented a collection view controller, and now I wish to add a bottom tool bar for navigation purposes. Under the Simulated Metrics tab in the Collection View Controller, I have enabled the bottom toolbar, and it shows up in the storyboard, and I am able to edit and interact with it.
When I run the app in the iPad simulator, the bottom toolbar does not appear. Is there some setting that I am missing that causes it to show in the storyboard and not in the app?
Any suggestions would be appreciated.
You can embed the UIViewController inside a UINavigationController. In the Storyboard, set the Simulated Metrics for Bottom Bar to one of the Toolbar options on the UINavigationController. You will then notice the Toolbar on the bottom of the UICollectionViewController.
I have done this using Xcode 6.3.2.
I had the same problem in Interface Builder.
Adding the toolbar programmatically works fine, though:
// viewWillAppear:
// set up toolbar
UIToolbar *toolbar = [[UIToolbar alloc] initWithFrame:CGRectMake(0, self.view.bounds.size.height-44, self.view.bounds.size.width, 44)];
toolbar.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleTopMargin;
[self.view addSubview:toolbar];
// instantiate spacer, middleItem
toolbar.items = @[spacer, middleItem, spacer];
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With