Graphics Programs Reference
In-Depth Information
•
UIImagePickerControllerSourceTypeCamera
- The user will take a
new picture.
•
UIImagePickerControllerSourceTypePhotoLibrary
- The user
will be prompted to select an album and then a photo from that album.
•
UIImagePickerControllerSourceTypeSavedPhotosAlbum
- The
user picks from the most recently taken photos.
Figure 12.8
shows the results of using each constant.
Figure 12.8 UIImagePickerControllerTypes
The first source type,
UIImagePickerControllerSourceTypeCamera
, won't
work on a device that doesn't have a camera. So before using this type, you have to check
for a camera by sending the message
isSourceTypeAvailable:
to the
UIImagePickerController
class. Sending this message to
UIImagePicker-
Controller
with one of the source type constants returns a Boolean value for whether
the device supports that source type.