我有一個用戶可以登錄的應用程序。如果用戶啓動應用程序並且已經登錄,那麼rootViewController
設置爲我的自定義UITabBarController
,但是當用戶未登錄rootViewController
被設置爲LoginVC(視圖控制器)。我的問題是,當用戶註銷時,應該呈現LoginVC並且TabBar應該被初始化。Deinit UITabBarController在呈現新的ViewController後
我曾嘗試:
self.tabBarController?.dismiss(animated: true, completion: {
self.tabBarController?.present(LoginVC(), animated: true, completion: nil)
})
之類的東西......我 可呈現LoginVC但是當我打電話self.tabBarController?.dismiss
的LoginVC被駁回,而不是TabBarVC
任何幫助將是非常感謝
有沒有辦法讓這個過渡動畫? – Phyber
https://stackoverflow.com/questions/7703806/rootviewcontroller-switch-transition-animation –