Storyboard间跳转

2016-07-06  本文已影响23人  AlvinKeung

let vc =UIStoryboard(name:"Main", bundle:nil).instantiateInitialViewController() as UIViewController!

self.presentViewController(vc, animated:true) {

}

"Main"为跳转的目标Storyboard

如果要跳到指定的vc2:instantiateViewControllerWithIdentifier("vc2")

需要设置vc2的storyboardID为vc2(名称随意)

上一篇 下一篇

猜你喜欢

热点阅读