Iphone 将库照片作为UIImage的源

Iphone 将库照片作为UIImage的源,iphone,cocoa-touch,uikit,Iphone,Cocoa Touch,Uikit,如何将照片库中的图像和相机作为源提供给UIImage /* On button click i want to save image */ myImage = /*What i have to give here to take camera or library images*/ UIImageWriteToSavedPhotosAlbum(myImage, self, @selector(image:didFinishSavingWithError:contextInfo:), ni

如何将照片库中的图像和相机作为源提供给UIImage

/* On button click i want to save image */
myImage = /*What i have to give here to take camera or library images*/
UIImageWriteToSavedPhotosAlbum(myImage, self,
    @selector(image:didFinishSavingWithError:contextInfo:), nil);

您需要使用对象。它将显示模式视图,允许拍照或从设备库中选择图像。您还应该熟悉UIImagePickerControllerDelegate协议。有了这两个功能,就可以轻松地与摄像头和设备库进行交互。

这似乎重复了您之前提出的问题: