Skip to content

Commit

Permalink
Fix UIActivityViewController bug with iOS 8
Browse files Browse the repository at this point in the history
  • Loading branch information
Bluezen committed Sep 18, 2014
1 parent e5eac8e commit c701a07
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ @implementation MHPinchGestureRecognizer
@end

@interface MHGalleryImageViewerViewController()
@property (nonatomic, strong) UIActivityViewController *activityViewController;

This comment has been minimized.

Copy link
@Bluezen

Bluezen Sep 18, 2014

Author

Appears to be never used?

@property (nonatomic, strong) UIBarButtonItem *shareBarButton;
@property (nonatomic, strong) UIBarButtonItem *leftBarButton;
@property (nonatomic, strong) UIBarButtonItem *rightBarButton;
Expand Down Expand Up @@ -302,6 +301,10 @@ -(void)sharePressed{
if (imageToShage != nil) {
UIActivityViewController *act = [UIActivityViewController.alloc initWithActivityItems:@[imageToShage] applicationActivities:nil];
[self presentViewController:act animated:YES completion:nil];

if ([act respondsToSelector:@selector(popoverPresentationController)]) {
act.popoverPresentationController.barButtonItem = self.shareBarButton;
}
}
}
}
Expand Down

0 comments on commit c701a07

Please sign in to comment.