MPMoviePlayerController未设置背景图像的边界

时间:2012-08-29 03:34:47

标签: iphone objective-c mpmovieplayercontroller

我正在使用MPMoviePlayerController播放媒体。我想在播放器的背景设置图像。相应地设置图像,但是当我设置图像的边界时,图像不是根据边界设置的。我试过以下代码:

        UIImageView *imageView=[[UIImageView alloc]initWithImage:[operationControl getCoverImage:stringId]];
    imageView.bounds=CGRectMake(0, 100, 200, 200);
    [moviePlayer.backgroundView addSubview:imageView];
    [moviePlayer.backgroundView setBackgroundColor:[UIColor purpleColor]];   
    moviePlayer.controlStyle = MPMovieControlStyleDefault;
    moviePlayer.shouldAutoplay = YES;
    [moviePlayer setScalingMode:MPMovieScalingModeAspectFit];
    [self.view addSubview:moviePlayer.view];
    [moviePlayer setFullscreen:YES animated:YES];

0 个答案:

没有答案