1

I want user to login before going to split view controller. I tried to create a push segue then call the performSegueWithIdentifier. An error comes out. It says "Terminating app due to uncaught exception 'NSGenericException', reason: 'Could not find a navigation controller for segue 'fromLoginToTask'. Push segues can only be used when the source controller is managed by an instance of UINavigationController.'"

Thanks.

Pak Ho Cheung
  • 1,382
  • 6
  • 22
  • 52

1 Answers1

1

I think what you want is to utilize UIViewControllerTransitioningDelegate UIViewControllerTransitioningDelegate Protocol Reference

It's a bit more work to implement, but it should do the proper changing of root view controllers which I think is the issue when trying to use a segue how you describe.

solenoid
  • 954
  • 1
  • 9
  • 20
  • I fixed it by creating a navigation controller and using a container to contain the split view. Then, it works perfect. Thanks anyway. Please update your answer or keep it as is. I will give you a tick no matter what:) – Pak Ho Cheung Mar 20 '16 at 04:45