MPMoviePlayerController not setting the bounds for background image

Posted by VXtreme on Stack Overflow See other posts from Stack Overflow or by VXtreme
Published on 2012-08-29T03:34:46Z Indexed on 2012/08/29 3:38 UTC
Read the original article Hit count: 247

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];

© Stack Overflow or respective owner

Related posts about iphone

Related posts about objective-c