很简单,我想用它拍照UIImagePicker
并将其放入NSMutableArray
. 我有以下代码。相机部分工作正常,出于测试目的,图像显示在UIImage
名为photoImageView中。但是我似乎无法将图像添加到数组中。感激地收到任何帮助。
@property (nonatomic, retain) NSMutableArray *photos;
- (void) imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info
{
UIImage *photoTaken = (UIImage *)[info valueForKey:UIImagePickerControllerOriginalImage];
photoImageView.image=photoTaken;
[photos addObject:[UIImage photoTaken];
[picker dismissViewControllerAnimated:YES completion:nil];
}