开发者

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().

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜