Skip to content
This repository has been archived by the owner on Apr 15, 2019. It is now read-only.

Commit

Permalink
Restore iOS < 8 compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
x2on committed Nov 4, 2014
1 parent a2a590f commit fa093cc
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions FSImageViewer/FSImageViewerViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -216,8 +216,10 @@ - (void)share:(id)sender {
NSAssert(currentImage.image, @"The image must be loaded to share.");
if (currentImage.image) {
UIActivityViewController *controller = [[UIActivityViewController alloc] initWithActivityItems:@[currentImage.image] applicationActivities:_applicationActivities];
if(!controller.popoverPresentationController.barButtonItem){
controller.popoverPresentationController.barButtonItem = shareButton;
if([controller respondsToSelector:@selector(popoverPresentationController)]) {
if (!controller.popoverPresentationController.barButtonItem) {
controller.popoverPresentationController.barButtonItem = shareButton;
}
}
[self presentViewController:controller animated:YES completion:nil];
}
Expand Down

0 comments on commit fa093cc

Please sign in to comment.