开发者

Capture the preview of a UIImagePickerController

This has been asked many times. But 开发者_运维技巧most answers are not applicable to the latest OS (3.0+) or they are "Apple will reject it".

What I need is to programmatically grab the image displayed in the preview of the UIImagePickerController without having the user take a photo and use the image - what I actually need is to get a screenshot of my app, which contains the camera in the background and other stuff on the foreground.

I have tried several methods, with the latest being: iterate through all the subviews of the UIImagePickerController.view and save them as images using the [view.layer renderInContext:] method. With this method, I can actually get all the controller's assets (the buttons etc) but I can never see the actual preview. Has anyone figured a way to do this in 3.0+ ?


This has been answered in question 1317978 already. Also, have a look at the blog post describing live grabbing in sudoku solver

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜