Created
December 3, 2013 08:10
-
-
Save akuraru/7765683 to your computer and use it in GitHub Desktop.
segueのidをいちいち比較するのが面倒なので、最近はこんな感じで書いてたりする。senderがBlocks以外だったらどうするか?知りませんよそんなの
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- (IBAction)touchMove:(id)sender { | |
__weak typeof (self) this = self; | |
[self performSegueWithIdentifier:kSeguePicture sender:^(id controller) { | |
[controller setViewObject:this.viewObject]; | |
}]; | |
} | |
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(void (^)(id))sender { | |
if (sender) { | |
sender(segue.destinationViewController); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment