RollRoll
RollRoll

Reputation: 8462

Won't isSourceTypeAvailable:UIImagePickerControllerSourceTypeSavedPhotosAlbum always return YES?

I'm confused sometimes with iOS development. Won't this always return true?

if([UIImagePickerController isSourceTypeAvailable:UIImagePickerControllerSourceTypeSavedPhotosAlbum])
{
    //
}

Upvotes: 2

Views: 733

Answers (1)

rmaddy
rmaddy

Reputation: 318824

That will return NO if the user has no images in their photo library. From the docs for UIImagePickerController isSourceTypeAvailable::

Because a media source may not be present or may be unavailable, devices may not always support all source types. For example, if you attempt to pick an image from the user’s library and the library is empty, this method returns NO.

Upvotes: 1

Related Questions