Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

segue does not work in simple segue test

I have a weird problem. I have created 2 viewcontrollers in my storyboard: testSegueViewcontroller and nextPageViewController.
The testSegueViewcontroller contains a UIButton NextPage. I Ctrl-dragged from this button to nextPageViewController and created a Push segue.

The problem is when i run this program and clicking on the NextButton in the testSegueViewcontroller it does not show the nextPageVieController :-(

Any ideas of what I'm doing wrong?

like image 341
reinvdo Avatar asked Jan 07 '12 09:01

reinvdo


2 Answers

With this approach you should use modal segues. Push segue is a part of UINavigationController transitions

If you want to use push segue then you will need to put your testSegueViewcontroller into UINavigationController instance. This will allow the Push segue to work.

like image 184
voromax Avatar answered Sep 23 '22 15:09

voromax


Push segue is a part of navigationcontroller if your viewcontroller is embed with uinavigation controller then only you will able to push the controller to another view. If you don't want to add navigation controller then use modal transitions.

like image 30
mashios Avatar answered Sep 21 '22 15:09

mashios