Mpmovieplayerviewcontroller *movieplayerviewcontroller = [[Mpmovieplayerviewcontroller alloc] init]; MoviePlayerViewController.view.frame = CGRectMake (0, 0, self.view.bounds.size.height, self.view.bounds.size.width); MoviePlayerViewController.view.center = Cgpointmake (SELF.VIEW.BOUNDS.SIZE.WIDTH/2, SELF.VIEW.BOUNDS.SIZE.HEIGHT/2 ); Cgaffinetransform transform = cgaffinetransformmakerotation (M_PI/2); [Movieplayerviewcontroller.view Settransform:transform]; [Self.view AddSubview:moviePlayerViewController.view];
If you need to zoom in to set the Movieplayerviewcontroller.scalingmode property, there are 4 options available.
You'll find that the system status bar rotates with the screen, and the best way to do this is to hide it
In viewwillappear: [[UIApplication sharedapplication] setstatusbarhidden:yes];
Viewdiddisappear: li [[uiapplication sharedapplication] setstatusbarhidden:no];
IOS video Playback horizontal screen, hide status bar