1

我正在使用 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];
4

0 回答 0