I'm starting to work on an ipad application that would require activity (or functions) on the detail view and would push (or transfer) to another view controller depending on the button tapped.
Trying to figure out if segue is what I'm supposed to be using with this.
My storyboard looks like this:
SplitViewController -> navigationcontroller(master view) / login (detail view) -> dashboard (will be transferred on successful login
But whenver I tap the button and successfully login it would give me this error:
Push segues can only be used when the source controller is managed by an instance of UINavigationController.'
Thoughts?
EDIT: Code that pushes to the next viewcontroller
- (IBAction)btnSubmit:(id)sender {
User *user = [[User alloc] init];
user.email = self.txtEmail.text;
user.rawPassword = self.txtPassword.text;
if(user.isValid){
[self performSegueWithIdentifier:@"LoginSuccess" sender:self];
}
}
The error is telling you that you are using the option push without embedding a navigation controller. If you don't want to use navigation controller just click on the segue connection in storyboard and change it to modal and it will move the views without error.