iOS开发中界面跳转有两种方式,上下跳转和左右跳转。
上下跳转_TO:
- let secondViewController = SecondViewController()
- self.presentViewController(secondViewController, animated: true, completion: nil)
上下跳转_BACK:
- dismissViewControllerAnimated(true, completion: nil)
-----------------------------------------------
-----------------------------------------------
左右跳转_TO:
(将新的视图控制器PUSH到navigationController中,相当于入栈操作)
- let secondViewController = SecondViewController()
- self.navigationController!.pushViewController(secondViewController, animated: