Reputation: 443
I am new in iOS. I use Seven Tab bar item in my tab bar controller story board and when run app then it shows more buttons when I click on it it is also show edit button. I do not want that edit button. How can this be done?
This is my code:
[[[tabBarController moreNavigationController] visibleViewController] setTitle:@""];
But it does not work.
Upvotes: 2
Views: 3127
Reputation: 174
On Swift: You can also have those items you want to be editable in the array:
tabBarController.customizableViewControllers = []
Ensure that if you have a navigation controller for the tabbar controller that it is not translucent because the more navigation bar will be behind the main navigation bar. This sometimes shows an empty space above the more tableview.
You can completely hide the more navigation controller if you do not need it, since tapping the more tab pops the top view controller.
tabBarController.moreNavigationController.navigationBar.isHidden = true
Upvotes: 2
Reputation: 15217
You had to say that none of your view controllers is customizable. Then the edit button disappears. Please look up the docs.
tabBarController.customizableViewControllers = @[];
Docs: "This property controls which items in the tab bar can be rearranged by the user. When the user taps the More item on the tab bar view, a custom interface appears displaying any items that did not fit on the main tab bar. This interface also contains an Edit button that allows the user to rearrange the items. Only the items whose associated view controllers are in this array can be rearranged from this interface. If the array is empty or the value of this property is nil, the tab bar does not allow any items to be rearranged."
Upvotes: 11