I'm new to iOS development, I just have UITableViewController
in a storyboard. I would like to add a top bar to it with some buttons, how to do that?
Notice, I'm using UITabBar that is created by "Storyboard" and my ITableViewController is one item of the UITabBar.
When you create the UITableViewController
, do the following:
UINavigationController *navigationController = [[UINavigationController alloc] initWithRootViewController:tableViewController];
and then instead of setting the table view controller as the view, set it to the navigation controller. Inside your table view controller, you can set the left and right buttons for the navigation bar to UIBarButtonItem
s (ask me if you want to know how to do that).
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