File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed
Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -267,6 +267,17 @@ - (void)actionButtonTapped:(id)sender {
267267 [dc presentOptionsMenuFromRect: self .view.bounds inView: self .view animated: YES ];
268268 } else {
269269 UIActivityViewController *activityController = [[UIActivityViewController alloc ] initWithActivityItems: @[url] applicationActivities: activities];
270+
271+ #ifdef __IPHONE_8_0
272+ if (floor (NSFoundationVersionNumber ) > NSFoundationVersionNumber_iOS_7_1 &&
273+ UI_USER_INTERFACE_IDIOM () == UIUserInterfaceIdiomPad)
274+ {
275+ UIPopoverPresentationController *ctrl = activityController.popoverPresentationController ;
276+ ctrl.sourceView = self.view ;
277+ ctrl.barButtonItem = sender;
278+ }
279+ #endif
280+
270281 [self presentViewController: activityController animated: YES completion: nil ];
271282 }
272283 }
You can’t perform that action at this time.
0 commit comments