Created
June 12, 2014 16:39
-
-
Save jontelang/3cb1fceec309ef2c546c to your computer and use it in GitHub Desktop.
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
else if(buttonIndex==5) | |
{ | |
NSLog(@"[Snapper] Share pressed"); | |
UIViewController *vc = [[UIViewController alloc] init]; | |
self.rootViewController = vc; | |
UIActivityViewController *activityController = [[UIActivityViewController alloc] initWithActivityItems:@[imageView.image] applicationActivities:nil]; | |
isShowingShare = YES; | |
// Avoid share menu not respodning | |
[self removePan]; | |
activityController.completionHandler = ^(NSString *activityType, BOOL completed){ | |
NSLog(@"[Snapper] Done? %@ %i %i",activityType,completed,isShowingShare); | |
isShowingShare = NO; | |
// Add pan again, since we took it away before. | |
[self placePan]; | |
if( activityType == Nil ){ | |
[self showActivitySheet]; | |
} | |
else{ | |
[self dismiss]; | |
} | |
}; | |
[vc presentViewController:activityController animated:YES completion:Nil]; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment