Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

performSegueWithIdentifier in swift [closed]

If I have this Objective C code:

[self performSegueWithIdentifier:@"push" sender:self];


and

- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender
{
    if([segue.identifier isEqualToString:@"push"]) {

}

What is the Swift equivalent?

like image 559
Lola Avatar asked Jun 04 '14 05:06

Lola


1 Answers

self.performSegueWithIdentifier("push", sender: self)

override func prepareForSegue(segue: UIStoryboardSegue!, sender: AnyObject!) {
if segue.identifier == "push" {

}

You have a typo in your self.preformSegueWithIdentifier

like image 191
onevcat Avatar answered Oct 02 '22 13:10

onevcat