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