Very simply, I want to take a photo using UIImagePicker
and place it into an NSMutableArray
. I hve the following code below. The camera part works fine and for test purposes the image is displayed in a UIImage
called photoImageView. However I can't seem to add the image into the array. Any help gratefully received.
@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];
}