I want open viewcontroller by clicking button on another view controller.all of my project is codebase and i didnt use storyboard.how can i do it?
Asked
Active
Viewed 50 times
-2
-
Modal Presentation or Push to Navigation stack, depending on your approach. Do it in button's `IBAction` method – NSNoob Dec 31 '15 at 08:15
-
2Possible duplicate of [Navigation Controller Push View Controller](http://stackoverflow.com/questions/20742745/navigation-controller-push-view-controller) – NSNoob Dec 31 '15 at 08:17
1 Answers
1
You can do it like this
let vc = YourViewController()
self.navigationController!.pushViewController(vc, animated: true)

Rashwan L
- 38,237
- 7
- 103
- 107