I'm trying to change the background color of my MPMoviePlayerController, and I can't get it to stick.
I'm using:
moviePlayer.view.backgroundColor = [UIColor redColor];
I can see the background flash red while the video is loading. As soon as it is loaded, the background goes black again. I've tried setting the color after playback has started, but that has no effect.
I'm using iOS 5.
Edit: I'm actually attempting to set the background to [UIColor clearColor], not red. I should have asked my question properly in the first place.
backgroundColor
on MPMoviePlayerController
is deprecated and view
is documented as read-only. See: Deprecated MPMoviePlayerController Methods
backgroundColor
The color of the background area behind the movie. (Available in iOS 2.0 through iOS 3.1. Get the view from the backgroundView property and set its color directly.)@property (nonatomic, retain) UIColor *backgroundColor
So I would try using:
moviePlayer.backgroundView.backgroundColor = [UIColor redColor];
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With