[ios][switf]页面跳转

参考:http://bbs.csdn.net/topics/390899712

注意用push会崩溃

用其他的正常

1.storyboard直接拖拉,使用不同种类的segue均可
2.直接写代码:

//////push方式
self.navigationController.pushViewController(vc, animated:true)
//////present方式
self.presentViewController(vc, animated: true, completion: nil)

  

返回上一个页面

self.dismissViewControllerAnimated(true, completion: nil);

原文地址:https://www.cnblogs.com/lyggqm/p/5012311.html