2017-12-21 6 views
0

私のアプリの最初の部分は、ナビゲーションコントローラ内蔵のサインインセクションです。サインアップセクションが完了し、新しいユーザーが作成されると、UITabBarControllerに進み、各タブごとに別々のナビゲーションコントローラーを追加します。今すぐサインアップが完了し、私のUITabBarControllerが表示されても、私のアプリケーションの最初のセクションからUINavigationControllerが表示されます。新しいUITabBarControllerを入力すると、UINavigationControllerを終了するにはどうすればよいですか?UINabigationController to UITabBarController

enter image description here

enter image description here

そして、ここではあなたがより良いメインタブバーコントローラがアップになると一般的にサインアップする必要はない

self.navigationController?.present(vc, animated: true, completion: nil) 

を使用する必要があり、コード

import UIKit 

class SignUpSecondViewController: UIViewController, BEMCheckBoxDelegate { 

@IBAction func completeButtonAction(_ sender: Any) { 

    let storyboard = UIStoryboard(name: "Main", bundle: nil) 
    let vc = storyboard.instantiateViewController(withIdentifier: "NewTabBarViewController") as! UIViewController 
    // Alternative way to present the new view controller 
    self.navigationController?.show(vc, sender: nil) 
} 

答えて

1

です。この場合、これを行うとメモリからサインアップが削除されます。

let appDelegate = UIApplication.shared.delegate as! AppDelegate) 
appDelegate.window?.rootViewController = vc 
関連する問題