Swift 3.0 加载storyboard中文件并跳转

前端之家收集整理的这篇文章主要介绍了Swift 3.0 加载storyboard中文件并跳转前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

ScanIDCardViewController 是控制器的名字

let sb = UIStoryboard(name: "Main",bundle: nil)
let vc = sb.instantiateViewController(withIdentifier: "ScanIDCardViewController") as! ScanIDCardViewController
self.navigationController!.pushViewController(vc,animated: true)
原文链接:https://www.f2er.com/swift/322734.html

猜你在找的Swift相关文章