1

代码是:

if(![DeviceUtility isIpad])
{
   isPlayingVideo = YES;
   CGFloat width = [DeviceUtility isIphone5]?568:480;
   origBounds = self.view.bounds;
   origCenter = self.view.center;
   if(videoController == nil)
     videoController = [[UIViewController alloc] init];      
   [videoController.view setBounds:CGRectMake(0, 0, width, 320)];
   [videoController.view setCenter:CGPointMake(160, width/2)];
   [videoController.view setTransform:CGAffineTransformMakeRotation(M_PI / 2)];
   [[moviePlayerController view] setFrame:CGRectMake(0, 0, width, 320)];
    //

   [videoController.view addSubview:[moviePlayerController view]];     
   [self.view addSubview:videoController.view];
}
else
{
   [self.view addSubview:[moviePlayerController view] ];           
}
[moviePlayerController setFullscreen:YES animated:YES];
[moviePlayerController.view setHidden:NO];
[moviePlayerController play];

ios 5.1.1 链接中的结果

4

0 回答 0