2015-03-25 56 views
0

我基本上想要在登錄/註冊成功之後「擺脫」我爲我的登錄/註冊NavigationController設置的NavigationController。基本上,在按下登錄/註冊按鈕後,執行一些通過IBAction的代碼後,我正在執行手動循環。我的代碼運行得很好,但問題是,無論什麼時候執行segue,我的第二個視圖控制器,TabBarController(我想在某種程度上獨立於NavigationController)仍然在視圖頂部有導航欄(使用<Back按鈕)。我正在通過push segue進行轉換,這讓我意識到這不是正確的方法,因爲它意味着我將TabBarController嵌套到NavigationController本身。只是我不知道如何讓它獨立。如何擺脫UINavigationController後在Swift中執行一個UITabBarController?

我的做法是這樣的:

//...After various checks/functions, inside a function, I redirect myself to the TabBarController 

self.performSegueWithIdentifier("redirectToMenuFromRegistration", sender: nil) 

//Where the segue "redirectToMenuFromRegistration" is my TabBarController.. 

正如我所說的,我不想被嵌套我NavigationController內我的TabBarController,我希望它是莫名其妙獨立。現在另一個問題。如果我這樣做,我仍然能夠通過ViewControllers傳遞數據嗎?

非常感謝您的幫助!

乾杯!

回答

1

在故事板中將segue「Show」設置爲「Present Modally」。

enter image description here

+0

解決了我的問題!謝謝你的幫助! – idelara 2015-03-25 07:03:55

相關問題