开发者

how to show BlackTranslucent StatusBar in movie player?

开发者 https://www.devze.com 2023-03-13 06:18 出处:网络
I have a MPMoviePlayerController view added as a subview on my ViewController. I want to show BlackTranslucent StatusBar along with player controls. I have done the following:

I have a MPMoviePlayerController view added as a subview on my ViewController.

I want to show BlackTranslucent StatusBar along with player controls. I have done the following:

in viewdidload:

[[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleBlackTranslucent];

movieplayercontroller function:

self.player.controlStyle = MPMovieControlStyleFullscreen;        

self.player.fullscreen =开发者_C百科 TRUE;      
self.player.scalingMode=MPMovieScalingModeAspectFill;   

player.view.frame = [self.view bounds];
[player prepareToPlay]; 
[player play];   

but it's not comming up.


i think your problem is self.player.scalingMode=MPMovieScalingModeAspectFill;

i use just this code and i get the BlackTranslucent StatusBar

        [player setFullscreen:YES];

        // May help to reduce latency
        [player prepareToPlay];
        [player play];
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号