I am writing a camera app (similar to the native camera app) so that when the snap button is touched, I want to quickly grab the picture (from the hidden imageView) before the view resets and is ready to take another picture. Below is a snippet of code and my problem is the line: CGImageRef img = (CGImageRef)[view imageRef]. It gives me an error:No visible @interface for "UIView" declares the selector 'imageRef'. How can I fix this error?
- (BOOL)TakePictureFromImageView:(UIView*)view {
CGImageRef img = (CGImageRef)[view imageRef];
if (img)
{
UIImage *photo = [self correctImageOrientation:img];
UIImageWriteToSavedPhotosAlbum(thePhoto, nil, nil, nil);
return YES;
}
return NO;
}