I have a UITabBarController t开发者_JS百科hat has extra views in the moreNavigationController. I would like to be able to detect when the user has clicked Edit, and moves a view outside of moreNavigationController onto the regular UITabBarController items. How can I accomplish this?
A UITabBarController's behaviour can be fine-grained by giving it a delegate object which conforms to the UITabBarControllerDelegate
protocol.
You can do this either via code or with Interface Builder. If you've set up a custom UIApplicationDelegate
, you know what you're looking for.
Once you've done that, implement the tabBarController:didEndCustomizingViewControllers:changed:
method in your delegate. This method will be called after the customization pane has been dismissed and you can handle all your necessary logic within.
Read the ADC Documentation for UITabBarController and UITabBarControllerDelegate for more information.
精彩评论