I have a UIViewController. I want to add a UIToolbar to the bottom, but IB is not letting me. How can I achieve this?
Note: The UIViewController is part of a UINavigationController. I'm not sure if this affects the visibility of the toolbar.
Starting from iOS 3.0 you can set toolbar items you want using following UIViewController's method:
- (void)setToolbarItems:(NSArray *)toolbarItems animated:(BOOL)animated
of simply set or override toolbarItems property.
And toolbar will appear automatically if you put your view controller inside navigation controller.
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