UIImagePickerController を使用して画像を UIImageView に保存しようとしていますが、画像が保存されませんか?
- (IBAction)handleAvatarTap:(id)sender {
DLog(@"");
UIImagePickerController * picker = [[UIImagePickerController alloc] init];
picker.delegate = self;
picker.sourceType = UIImagePickerControllerSourceTypeCamera;
[self presentModalViewController:picker animated:YES];
}
- (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info {
[picker dismissModalViewControllerAnimated:YES];
UIImage* original =[info objectForKey:@"UIImagePickerControllerOriginalImage"];
// This is the line that sets the image but the original image assigned to it is still there?
[self.avatarImage setImage:[UIImage imageWithCGImage:original.CGImage]];
}