现在的位置: 首页 > 综合 > 正文

Swift用代码进行界面跳转

2019年09月05日 ⁄ 综合 ⁄ 共 271字 ⁄ 字号 评论关闭

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)

就可以了。


抱歉!评论已关闭.