码迷,mamicode.com
首页 > 编程语言 > 详细

Swift用代码进行界面跳转

时间:2015-01-25 16:40:10      阅读:236      评论:0      收藏:0      [点我收藏+]

标签:swift   界面跳转   

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)


就可以了。





Swift用代码进行界面跳转

标签:swift   界面跳转   

原文地址:http://blog.csdn.net/tpian928/article/details/43115253

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!