In my apps i designed a frame for camera viewer when i click the capture button i should get a single image along with my frame m开发者_开发知识库erged over the captured image.
What I did to achieve something like this was basically take a programatic screenshot of the area. You could maybe take the picture first and then apply the frame over it and then use the following code to take a screenshot. Make sure both the image and the frame are subViews of a UIView. In the example both of them would need to be part of "saveView".
UIGraphicsBeginImageContext(saveView.bounds.size);
[saveView.layer renderInContext:UIGraphicsGetCurrentContext()];
UIImage *finalImage = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();
精彩评论