iphone - Why can't I capture a screenshot of MPMoviePlayerController? -


I need to capture a screen shot of a video game in the mpmovieplayer controller, but whatever I get is one The red screen is (I created the red background and the cover scene with 0.5 alpha).

Here is the code:

  NSArray * windows = [[UIApplication shared application] window]; If ([windows count]> 1) {UIWindow * moviePlayerWindow = [[UIApplication shared application] keyWindow]; UIView * coverView = [[UIView alloc] initWithFrame: Movie Player Window.bounds]; [Main Controller Movie player pauses]; // Without that it will not work too! CoverView.backgroundColor = [UIColor redColor]; CoverView.alpha = 0.5; [Movieplayerviewview: coverview]; UIGraphicsBeginImageContext (coverView.bounds.size); [CoverView.layer renderInContext: UIGraphicsGetCurrentContext ()]; UIImage * Screenshots; Screenshots = UGraphicsGetImageFrintIngeTextEX (); UIGraphicsEndImageContext (); UIImageWriteToSavedPhotosAlbum (screenshot, own, zero, zero); }  

Any ideas ???

Thanks

I was curious about myself I believe There are similar issues with screenshot of OpenGL stuff.

If you look at this blog post, they have a way that works for an EAGLView, it may be worth visiting for your issue.


Comments

Popular posts from this blog

c# - How to capture HTTP packet with SharpPcap -

php - Multiple Select with Explode: only returns the word "Array" -

php - jQuery AJAX Post not working -