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 {
75
75
76
76
NSMutableArray <UIBarButtonItem *> *rightBarButtonItems = [NSMutableArray arrayWithCapacity: 2 ];
77
77
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
+ }
80
82
}
81
83
82
84
if (self.allowTrash ) {
@@ -258,6 +260,7 @@ - (void)shareItemTapped:(UIBarButtonItem *)sender {
258
260
} else {
259
261
// Fallback on earlier versions
260
262
activityViewController.popoverPresentationController .barButtonItem = sender;
263
+ activityViewController.popoverPresentationController .sourceView = self.view ;
261
264
}
262
265
[self presentViewController: activityViewController animated: YES completion: nil ];
263
266
}
You can’t perform that action at this time.
0 commit comments