MPMoviePlayerController Overlay iOS 6

Having a problem with MPMoviePLayerController with overlay in iOS6, before iOS6 everything worked fine.

It seems I can play a movie in full screen before I got this code:

@interface MovieOverlayViewController : UIViewController
{
    UIImageView *skiparrow;
}
@end


@implementation MovieOverlayViewController

-(void) viewWillAppear:(BOOL)animated
{
    [super viewWillAppear:animated];

    touchtoskip.frame = CGRectMake( xAdjust,
                                   yAdjust,
                                   touchtoskip.image.size.width / scale, 
                                   touchtoskip.image.size.height / scale);



    [self.view addSubview:touchtoskip];
}

Then:

overlay = [[MovieOverlayViewController alloc] init];

UIWindow *keyWnd = [[UIApplication sharedApplication] keyWindow];
[keyWnd addSubview:overlay.view];

A DOES message appears on my MoviePlayerViewController. And adds UIViews, but I don’t see anything else.

Really stuck, any suggestions?

+5
source share
1 answer

I think part of the problem is that you get the key window and add the subview view to it, instead of getting the view in the window and add the view to it.

MoviePlayer, , .

+3

All Articles