[英]How can I detect that a View was load in the tabBarController.moreNavigationController?
[英]How can I detect if a viewController is no longer in the moreNavigationController?
我有一個UITabBarController在moreNavigationController中有額外的視圖。 我希望能夠檢測用戶何時單擊“編輯”,並將視圖從moreNavigationController之外移至常規UITabBarController項上。 我該怎么做?
通過給UITabBarControllerDelegate
一個符合UITabBarControllerDelegate
協議的委托對象,可以細化其行為。
您可以通過代碼或使用Interface Builder來執行此操作。 如果已經設置了自定義UIApplicationDelegate
,那么您就會知道要查找的內容。
完成此操作后,在委托中實現tabBarController:didEndCustomizingViewControllers:changed:
方法。 關閉自定義窗格后 ,將調用此方法,您可以處理其中的所有必要邏輯。
有關更多信息,請閱讀ADC文檔UITabBarController和UITabBarControllerDelegate 。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.