[英]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.