iOS Tutorial Picking external documents with DocumentPickerViewController

Erel

Administrator
Staff member
Licensed User
]

iUI8 v1.60 adds a new type named DocumentPickerViewController. This picker allows the user to choose an external document. The document will be imported (copied) to your app file system.

Example:
B4X:
Sub Page1_Click
   DocumentPicker.InitializeImport("picker", Array("public.image"))
   DocumentPicker.Show(Page1, Button1)
   Wait For Picker_Complete (Success As Boolean, URLs As List)
   If Success Then
       ImageView1.Bitmap = LoadBitmap(URLs.Get(0), "")
   End If
End Sub
- List of common document types: https://developer.apple.com/library...es/System-DeclaredUniformTypeIdentifiers.html

- In case of file URLs the URL is converted to a file path automatically.
- Note that you should add #MinVersion: 8 when using iUI8 library.
 

asubias

Member
Licensed User
I have the following error in Xcode:
B4X:
Unknown type name 'B4IDocumentPickerViewController'; did you mean 'UIDocumentPickerViewController'?
B4i says that i have installed version 1.61 but it seems there is not the methods in my header file.

EDIT: I got the problem. The last B4iMacBuilder package contains version 1.51 of iUI8. Is out of date. Please, upload the latest version.
 
Last edited:
Top