Created
October 31, 2012 23:37
-
-
Save mluton/3990658 to your computer and use it in GitHub Desktop.
Display UIActivityViewController in a Popover
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
UIActivityViewController *activityViewController = [[UIActivityViewController alloc] initWithActivityItems:@[@"something"] applicationActivities:nil]; | |
self.popover = [[UIPopoverController alloc] initWithContentViewController:activityViewController]; | |
self.popover.delegate = self; | |
[self.popover presentPopoverFromBarButtonItem:sender permittedArrowDirections:UIPopoverArrowDirectionAny animated:YES]; |
+1, thanks!
+1
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
+1, thanks for this :)
I would like to add that if someone should be looking for an example of how to use this in a sample context, Apple provides a good sample project here: http://developer.apple.com/library/ios/#samplecode/Popovers/Introduction/Intro.html#//apple_ref/doc/uid/DTS40010436