Commit a078a1a6 authored by Carola Nitz's avatar Carola Nitz

VLCDocumentPickerController: minor codingstyle cleanup

(cherry picked from commit 22a26292)
parent 2b292c09
......@@ -23,28 +23,28 @@
#pragma mark - Public Methods
- (UIViewController *) configurePickerViewController {
- (UIViewController *)configuredPickerViewController
{
NSArray *types = @[(id)kUTTypeAudiovisualContent];
UIDocumentPickerMode mode = UIDocumentPickerModeImport;
if (@available(iOS 11.2, *)) {
// UIDocumentMenuViewController deprecated and does not support multiple selection
UIDocumentPickerViewController *picker = [[UIDocumentPickerViewController alloc] initWithDocumentTypes: types inMode:mode];
UIDocumentPickerViewController *picker = [[UIDocumentPickerViewController alloc] initWithDocumentTypes:types inMode:mode];
picker.delegate = self;
picker.allowsMultipleSelection = YES;
return picker;
} else {
UIDocumentMenuViewController *importMenu = [[UIDocumentMenuViewController alloc] initWithDocumentTypes:@[(id)kUTTypeAudiovisualContent] inMode:UIDocumentPickerModeImport];
importMenu.delegate = self;
UIDocumentMenuViewController *picker = [[UIDocumentMenuViewController alloc] initWithDocumentTypes:types inMode:mode];
picker.delegate = self;
return importMenu;
return picker;
}
}
- (void)showDocumentMenuViewController:(id)sender
{
UIViewController *picker = [self configurePickerViewController];
UIViewController *picker = [self configuredPickerViewController];
UIViewController *rootVC = [UIApplication sharedApplication].keyWindow.rootViewController;
UIPopoverPresentationController *popoverPres = picker.popoverPresentationController;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment