MPMoviePlayerController not setting the bounds for background image
- by VXtreme
I am using MPMoviePlayerController for playing the media . I want to set the image at the background of the player.The image is set accordingly but when i set the bounds for the image then the image is not set according to bounds . I have tried following code:
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];