1.storyborad上面画图,然后绑定一个cocoa的界面文件,storyboard id 和 restoration id 填类名
2.然后
var sb = UIStoryboard(name: "Main", bundle:nil)
var vc = sb.instantiateViewControllerWithIdentifier("dengluViewController") as dengluViewController
self.navigationController?.pushViewController(vc, animated: true)
就可以了。
原文地址:http://blog.csdn.net/tpian928/article/details/43115253