开发者

How can I detect if a viewController is no longer in the moreNavigationController?

开发者 https://www.devze.com 2023-01-03 20:21 出处:网络
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 moreNavigat

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号