segue does not work in simple segue test

10,673

Solution 1

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.

Solution 2

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.

Share:
10,673

Related videos on Youtube

reinvdo
Author by

reinvdo

Updated on June 09, 2022

Comments

  • reinvdo
    reinvdo almost 2 years

    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?

  • reinvdo
    reinvdo over 12 years
    thanx for the answer, i did not realize the fact of the uinavigation controller.
  • reinvdo
    reinvdo over 12 years
    thanx for the answer, i did not realize the fact of the uinavigation controller.
  • reinvdo
    reinvdo over 12 years
    thanx for the answer, i did not realize the fact of the uinavigation controller.
  • voromax
    voromax over 12 years
    You are welcome! Please take into account that it is better to follow the FAQ to get all the best from this site %)
  • mashios
    mashios over 12 years
    which problems you are facing exactly?
  • James
    James almost 12 years
    Don't know why this isn't marked as the answer already. Thanks a lot.
  • Zennichimaro
    Zennichimaro about 11 years
    thanks! this save me from turning insane!! I've been debugging and googling for hours!
  • Samir Mangroliya
    Samir Mangroliya over 6 years
    how can i put it in UINavigationController ?