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?

slack app

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

Popular posts from this blog

python - No exponential form of the z-axis in matplotlib-3D-plots -

php - Best Light server (Linux + Web server + Database) for Raspberry Pi -

c# - "Newtonsoft.Json.JsonSerializationException unable to find constructor to use for types" error when deserializing class -