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];
}
精彩评论