Skip to content
This repository was archived by the owner on Jun 19, 2025. It is now read-only.

Commit 6a2483e

Browse files
committed
Change demo project to support popover style on presenting media picker.
1 parent 9b3cafc commit 6a2483e

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Example/WPMediaPicker/DemoViewController.m

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,10 @@ - (void) showPicker:(id) sender
116116
mediaPicker.showMostRecentFirst = [self.options[MediaPickerOptionsShowMostRecentFirst] boolValue];
117117
mediaPicker.allowCaptureOfMedia = [self.options[MediaPickerOptionsShowCameraCapture] boolValue];
118118
mediaPicker.allowMultipleSelection = [self.options[MediaPickerOptionsAllowMultipleSelection] boolValue];
119+
mediaPicker.modalPresentationStyle = UIModalPresentationPopover;
120+
UIPopoverPresentationController *ppc = mediaPicker.popoverPresentationController;
121+
ppc.barButtonItem = sender;
122+
119123
[self presentViewController:mediaPicker animated:YES completion:nil];
120124
}
121125

0 commit comments

Comments
 (0)