Skip to content

Instantly share code, notes, and snippets.

@craigmarvelley
Created February 3, 2017 15:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save craigmarvelley/802920da11db4134b8bd3927820adae7 to your computer and use it in GitHub Desktop.
Save craigmarvelley/802920da11db4134b8bd3927820adae7 to your computer and use it in GitHub Desktop.
NSURL *pathToPdfFile;
UIActivityViewController *activityController = [[UIActivityViewController alloc] initWithActivityItems:@[ result ] applicationActivities:nil];
NSMutableArray *excludedActivities = [NSMutableArray array];
NSNumber *emailOutEnabled = [self.userPreferences.featureFlags valueForKeyPath:@"research.share.email"];
if (!emailOutEnabled.boolValue) {
[excludedActivities addObject:UIActivityTypeMail];
}
activityController.excludedActivityTypes = excludedActivities;
[exportController presentViewController:activityController animated:YES completion:nil];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment