簡體   English   中英

如何在沒有情節提要文件的情況下將另一個viewController推到屏幕上? 我已經嘗試了以下代碼,但沒有任何反應

[英]How do to I push another viewController to the screen without having storyboard file ? I've tried the following code but nothing happens

我嘗試這樣做。

let vc = AdminInfo() as UIViewController
self.navigationController?.pushViewController(vc, animated: true)

在Nib中,您可以按照以下步驟進行操作,在我的情況下,“ MusicCategoryVC”是我的ViewController。

   let nextvc = MusicCategoryVC(nibName: "MusicCategory", bundle: nil)
   navigationController?.pushViewController(nextvc, animated: true)

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM