Reputation: 311
I am trying to do view change with segue which activated by login button. But I cannot find performSeguewithIdentifier function in Xcode 6.1. What is the proper way to do that ?
Here is my scenario
User enters mail and password then clicks login button (1) Application checks user information if it is correct, then next view will be activated (2)
I already did application server connection and information checking so I need a way of opening new view after checking information.
Upvotes: 0
Views: 516
Reputation: 6888
You first create IBAction for the button and connect the action to Login button.
after that,
And add the below line after validating the fields,
[self performSegueWithIdentifier: @"segue_id" sender:self];
Upvotes: 0
Reputation: 71852
Here is Example:
self.performSegueWithIdentifier("push", sender: self)
override func prepareForSegue(segue: UIStoryboardSegue!, sender: AnyObject!) {
if segue.identifier == "push" {
}
May be this can help you.
Upvotes: 1