web-dev-qa-db-ja.com

swift)のperformSegueWithIdentifier

このObjective Cコードがある場合:

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


そして

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

}

Swift同等のものは何ですか?

12
Lola
self.performSegueWithIdentifier("Push", sender: self)

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

}

self.preformSegueWithIdentifierにタイプミスがあります

26
onevcat