2017-01-11 59 views
0

我正試圖在其他故事板上顯示帳戶viewcontroller。但是當我介紹它時,Tabbar不顯示。提供導航欄和非根視圖tabbar控制器

這是我在另一個故事板上的代碼,當我想要在另一個故事板上按一個按鈕時,它會轉到帳戶viewcontroller(請參閱圖片)對不起,我的英語。由於

 let storyboard : UIStoryboard = UIStoryboard(name: "UnitedArabEmirates", bundle: nil) 
     let vc = storyboard.instantiateViewController(withIdentifier: "UAE") 
     self.present(vc, animated: true) 

編輯:對不起,我錯了問題。讓我重新修飾它。對不起,我對編程和swift很陌生。

這是我的第一個故事板,當我拍了拍「上傳簡歷」時,進入到第二個故事板,並提出我的AccountViewController或者它被命名標識爲「帳戶」,但是當我嘗試提交,使用TabBar包含3個標籤欄項目不顯示。只是導航欄。我如何提供具有3個tabbar項目的AccountViewController。非常感謝你的回覆。

這是我的第一個故事板

enter image description here

這裏是我的第二個故事板

enter image description here

這裏是介紹我的AccountViewController當我拍了拍上傳簡歷代碼

let storyboard : UIStoryboard = UIStoryboard(name: "UnitedArabEmirates", bundle: nil) 
let vc = storyboard.instantiateViewController(withIdentifier: "Account") 
self.present(vc, animated: true) 

回答

0
let storyboard : UIStoryboard = UIStoryboard(name: "UnitedArabEmirates", bundle: nil) 
let vc = storyboard.instantiateViewController(withIdentifier: "UAE") 
self.navigationcontroller.present(vc, animated: true) 

請試試這個。

0

給ViewController作爲NavigationController然後呈現它。它會顯示標籤欄。

let vc : YourViewController = self.storyboard!.instantiateViewController(withIdentifier: "UAE")as! YourViewController 
let navController = UINavigationController(rootViewController: vc) // Creating a navigation controller with VC1 at the root of the navigation stack. 
self.present(navController, animated: true, completion: { _ in }) 
相關問題