photo album on iphone
The below code is for go to photo albums.The below code shows an error. I'm adding the UIImagePickerControllerDelegates like this in my .h file:
@interface My_Pictures : UIViewController <UINavigationControllerDelegate,UIImagePickerControllerDelegates>
But I'm not importing anything in my .m file. Should I include any of the Frameworks? Please give me a clear explanation.
ipc = [[UIImagePickerControll开发者_C百科er alloc] init];
ipc.delegate = self;
if([UIImagePickerController isSourceTypeAvailable:UIImagePickerControllerSourceTypeCamera])
{
ipc.sourceType = UIImagePickerControllerSourceTypeCamera;
}
else {
ipc.sourceType = UIImagePickerControllerSourceTypePhotoLibrary;
}
[self presentModalViewController:ipc animated:YES];
You have to implement delegate like this in .h class
@interface My_Pictures : UIViewController<UIImagePickerControllerDelegate>
All the best.
UIImageWriteToSavedPhotosAlbum().
精彩评论