Last active
August 29, 2015 13:56
-
-
Save keicoder/9017302 to your computer and use it in GitHub Desktop.
objective-c : presentView and dismissView method with block
This file contains hidden or 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
| //presentView and dismissView method with block | |
| NSLog(@"Presenting view"); | |
| [self presentViewController:changeLocationViewController animated:YES completion:^{ | |
| NSLog(@"View done presenting"); | |
| }]; | |
| NSLog(@"Dismissing view"); | |
| [self dismissViewControllerAnimated:NO completion:^{ | |
| NSLog(@"View done dismissing"); | |
| }]; | |
| //ex | |
| - (IBAction)doneButtonPressed:(id)sender { | |
| if (debug==1) {NSLog(@"Running %@ '%@'", self.class, NSStringFromSelector(_cmd));} | |
| [self dismissViewControllerAnimated:YES completion:^{ | |
| NSLog(@"Dismissing View"); | |
| NSLog(@"View done dismissing"); | |
| }]; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment