Reputation: 872
I am developing a Window-based application in which, I added tabBarController and have table view to navigate from one table view(RootViewContoller
) to another table view(FavoriteViewController
).
In this table view(FavoriteViewController
), I wanna add a toolBar. please aid me to overcome this problem. Thanks....
Upvotes: 0
Views: 1689
Reputation: 55604
If your table views are in a UINavgiationController, you can set the toolbar items on the UITableViewControllers, and then set the Toolbar hidden property to NO on the navigationController:
[self setToolbarItems:myArrayOfToolbarButtonItems];
[self.navigationController setToolbarHidden:NO animated:YES];
where myArrayOfToolbarButtonItems
is an NSArray
of UIBarButtonItem
, that have already been set up.
(the above code would go in your UITableViewControllers, and you can set different items for different table views that would change automatically when they are pushed)
Upvotes: 3