File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -75,8 +75,10 @@ - (void)viewDidLoad {
7575
7676 NSMutableArray <UIBarButtonItem *> *rightBarButtonItems = [NSMutableArray arrayWithCapacity: 2 ];
7777
78- if (self.allowShare ) {
79- [rightBarButtonItems addObject: self .shareItem];
78+ if (@available (iOS 16.0 , *)) {
79+ if (self.allowShare ) {
80+ [rightBarButtonItems addObject: self .shareItem];
81+ }
8082 }
8183
8284 if (self.allowTrash ) {
@@ -258,6 +260,7 @@ - (void)shareItemTapped:(UIBarButtonItem *)sender {
258260 } else {
259261 // Fallback on earlier versions
260262 activityViewController.popoverPresentationController .barButtonItem = sender;
263+ activityViewController.popoverPresentationController .sourceView = self.view ;
261264 }
262265 [self presentViewController: activityViewController animated: YES completion: nil ];
263266}
You can’t perform that action at this time.
0 commit comments