ios - Using the UIDocumentPickerViewController, is it possible to show a default service (Dropbox, Google Drive, etc) on first open like in Slack? -
normally, behavior uidocumentpicker present, user must use "locations" menu on top right switch between services. possible display either "dropbox" or "google drive" first default? if we're "deeplinking" uidocumentpicker service.
it seems slack app able , mymail app wasn't able find api it. ideas?
instead of using uidocumentpickerviewcontroller, try using uidocumentmenuviewcontroller. here relevant documentation.
uidocumentmenuviewcontroller *documentprovidermenu = [[uidocumentmenuviewcontroller alloc] initwithdocumenttypes:[self utis] inmode:uidocumentpickermodeimport]; documentprovidermenu.delegate = self; [self presentviewcontroller:documentprovidermenu animated:yes completion:nil];
by default, display apps include document provider extension (such dropbox, google drive, icloud, etc.). if user has dropbox or google drive installed on device, these options show automatically.
you can add custom options menu calling addoptionwithtitle:image:order:handler:
method.
Comments
Post a Comment