samedi 1 août 2015

Edit button not displayed in UITabBarController's MoreNavigationController

A UITabBarController is being pushed onto the stack:

let presenter = presentingViewController as! UINavigationController
let tabvc = UITabBarController()
tabvc.viewControllers = vcs
tabvc.customizableViewControllers = vcs
presenter.pushViewController(tabvc, animated: true)

Once presented the more tab button correctly shows, but the edit button to rearrange the tab bars does not. According to the docs on the MoreNavigationController:

The interface for the standard More item includes an Edit button that allows the user to reconfigure the tab bar. By default, the user is allowed to rearrange all items on the tab bar. If you do not want the user to modify some items, though, you can remove the appropriate view controllers from the array in the customizableViewControllers property.

My guess is that the tab bar is not happy being in a navigation controller. Any ideas on bringing the edit button back?

Aucun commentaire:

Enregistrer un commentaire