Take the 2-minute tour ×

I want to record UIView activity, its just like capturing screen in video, so this can be played back later.

in my app we are having one MPMediaPlayerController and PPT file so I want to record the video as well PPT slides as user moves its pages, so both things needs to be merged in single video, I guess it is possible if we can screen capture the UIView by some way, is there any way where we are having control over UIview to capture the screen and store it in movie format?

share|improve this question

1 Answer 1

You can "screenshot" view by using this code:

UIGraphicsBeginImageContext(CGSizeMake(100,100));//arbitrary size
[yourView.layer renderInContext:UIGraphicsGetCurrentContext()];
UIImage* image = UIGraphicsGetImageFromCurrentContext();

And then using something like AVFoundation create video out of images. But this "screenshoting" approach is not very quick for realtime capture and might make your UI pretty unresponsive.

share|improve this answer
But this approach will not going to record audio from other video..... –  PGU Nov 22 '12 at 8:04

Your Answer


