开发者

Accessing images from photo albums in ipad

Is it possible to access images inside the folders in albums in iPad's library through UIImagePickerControlle开发者_开发问答r

Thanks, Christy


Use this instead:

imagePicker.sourceType = UIImagePickerControllerSourceTypeSavedPhotosAlbum


Yes!

imagePicker.sourceType = UIImagePickerControllerSourceTypePhotoLibrary;


here's the code......just create a button...n get the selected image from picker any where u want(modal or an view) u can also access camera pics by using

picker.sourceType = UIImagePickerControllerSourceTypeCamera; 


-(IBAction) getPhoto:(id) sender {
    UIImagePickerController * picker = [[UIImagePickerController alloc] init];
    picker.delegate = self;

    if((UIButton *) sender == choosePhotoBtn) {
        picker.sourceType = UIImagePickerControllerSourceTypeSavedPhotosAlbum;
    } 

    [self presentModalViewController:picker animated:YES];
}
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜