Skip to content

Commit 5be38e4

Browse files
committed
Merge pull request TransitApp#109 from sstepashka/master
iOS 8 and XCode 6 support
2 parents cf08b5a + 2d54c91 commit 5be38e4

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

SVWebViewController/SVWebViewController.m

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff 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
}

0 commit comments

Comments
 (0)