I am trying to use the UIActivityViewControllerCompletionHandler
, but i dont quite get how..
I want to detect when the user finishes or dismisses this
Here's how you show a sharing dialog and set its completion handler
NSArray *imageArray = [NSArray arrayWithObject:shareImage];
UIActivityViewController *sharing = [[UIActivityViewController alloc] initWithActivityItems:imageArray applicationActivities:nil];
[sharing setCompletionHandler:^(NSString *activityType, BOOL completed) {
NSLog(@"completed dialog - activity: %@ - finished flag: %d", activityType, completed);
}];
[self presentViewController:sharing animated:YES completion:nil];