File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -267,12 +267,21 @@ - (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- [self presentViewController: activityController animated: YES completion: nil ];
270+ #ifdef __IPHONE_8_0
271+ if (floor (NSFoundationVersionNumber ) > NSFoundationVersionNumber_iOS_7_1 &&
272+ UI_USER_INTERFACE_IDIOM () == UIUserInterfaceIdiomPad)
273+ {
274+ UIPopoverPresentationController *ctrl = activityController.popoverPresentationController ;
275+ ctrl.sourceView = self.view ;
276+ ctrl.barButtonItem = sender;
277+ }
278+ #endif
279+ [self presentViewController: activityController animated: YES completion: nil ];
271280 }
272281 }
273282}
274283
275- - (void )doneButtonTapped : (id )s ùender {
284+ - (void )doneButtonTapped : (id )sender {
276285 [self dismissViewControllerAnimated: YES completion: NULL ];
277286}
278287
You can’t perform that action at this time.
0 commit comments