alanvabraham
alanvabraham

Reputation: 799

Draw over a video in an iphone application

I am looking for a method so that i can make an iphone application which plays video and the user be able to draw over the video that is being played..
I would really appreciate it if some one could share some information on this regard..

Upvotes: 0

Views: 1582

Answers (2)

Tony
Tony

Reputation: 4609

Hey there so yes putting a UIVIew over the video is going to be your best bet and then use quartz2d for drawing over it. And then lets say you would like to take a screen shot go ahead and use this code.

UIGraphicsBeginImageContext(self.bounds.size);
[self.layer renderInContext:UIGraphicsGetCurrentContext()];
UIImage *viewImage = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();

There you are! Oh and if you wanna say put an image or a UIIMageView over the video. Its not different at all. Just add the UIImageView to the UIView thats over the video:) Enjoi!

Upvotes: 0

EricS
EricS

Reputation: 9768

In the simplest case, you could just put a UIView with a transparent background on top of the video being played.

If you want to merge/flatten the images, it gets a bit more complicated. Can you go into more detail on exactly what you're trying to do?

Upvotes: 3

Related Questions