我想它可以被複制,但我到處尋找,並沒有找到我的解決方案。從UITabBarController上消除
所以關於我的問題。我有這樣的事情 open this image to see more
在我的AppDelegate我有FUNC
func logIn() {
let userExist = UserDefaults.standard.string(forKey: "auth_key_user")
if userExist != nil && userExist != "" {
let storyboard: UIStoryboard = UIStoryboard(name: "Main", bundle: nil)
let whereToGo = storyboard.instantiateViewController(withIdentifier: "AllPostsOfUserTabBarController") as! AllPostsOfUserTabBarController
window?.rootViewController = whereToGo
}
}
如果用戶存在,導致我的標籤欄控制器中的第一個視圖控制器。在那裏我有導航按鈕與行動註銷。 我需要註銷(發送數據到服務器),然後轉到我的第一個視圖控制器與文本字段和按鈕,我可以再次登錄。
我如何需要實現它?
任何問題,使用上面的代碼面對? – KKRocks