Reputation: 1597
Having an issue with MPMoviePLayerController with an overlay in iOS6, prior to iOS6 things were working fine.
It seems I can play a movie in full screen, before I had 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];
On my MoviePlayerViewController the view DOES appear. And adds the UIViews, but I see NOTHING anymore.
Really stuck, any suggestions?
Upvotes: 5
Views: 3606
Reputation: 150615
I think part of the problem is that you are getting the key window and adding a subview to that, rather than getting the window's view and adding a subview to that.
Have a look at the MoviePlayer sample, which shows how to add a player with subviews to control playback.
Upvotes: 3