iOS Picture Picker
From Xojo Documentation
A Picture Picker provides a way for the user to choose an existing picture from the camera roll, photo library, or they can choose to take a new picture. This control does not have UI that displays on the layout so it appears in the Shelf when dragged to the layout.
Below are commonly used events, properties and methods. Refer to iOSPicturePicker in the Language Reference for the complete list.
Events
- Called when the user cancels picking a picture.
- Called when the user selects a picture or takes a picture. The picture is provided as a parameter.
Properties
- Enables some basic editing controls in the Picture Picker.
- Specifies the where the user can choose the picture from using the Sources enum: Camera, CameraRoll, PhotoLibrary.
Methods
- Displays the Picture Picker. You have to provide the parent view.
Usage
This code lets the user pick a picture from the photo library:
PicturePicker1.Source = iOSPicturePicker.Sources.PhotoLibrary
PicturePicker1.Show(Self)
PicturePicker1.Show(Self)
This code in the Selected event handler displays the selected picture in an Image View:
MyImageView.Image = pic
Example Projects
- Examples/iOS/Controls/PicturePicker
See Also
iOSPicturePicker class; UserGuide:iOS UI topic