IOS - Youtube Player Controller Control Panel Color in Full Screen

I have a built-in youtube in a view using UIWebView.

NSString *html = [NSString stringWithFormat:@"<html> <body style=\"margin:0;\"><iframe class=\"youtube-player\" type=\"text/html\" width=\"%f\" height=\"%f\" src=\"http://www.youtube.com/embed/%@\" frameborder=\"0\" allowfullscreen></iframe></body></html>", self.view.bounds.size.width - kTitleLabelLeftIndent*2, kUIWebViewHeight, self.utubeId]; utubeWebView = [[UIWebView alloc]init]; [utubeWebView setAllowsInlineMediaPlayback:YES]; [utubeWebView loadHTMLString:html baseURL:nil]; 

The YouTube URL is well embedded in my application. And when I click the Play button on utudeWebView, it shows full screen mode:

enter image description here

where the red control panel on top does not look good. Can someone tell me how can I change the color of this panel?

Any suggestions would be appreciated. Thanks in advance,

John

+4
source share
1 answer

I understood why it was now red.

In my AppDelegate app, I set the look of the NavigationBar:

 [[UINavigationBar appearance] setTintColor:[UIColor redColor]]; 

I did not notice the connection between the navigation bar and the video control panel, because I had a hidden navigationBar set.

Be that as it may, the navigationBar color setting will also affect the color of the MPmoviePlayerController control panel. Therefore, by setting Color Tint Color, I could change the color of the control panel. Here are some examples:

enter image description here

enter image description here

+6
source

Source: https://habr.com/ru/post/1482804/


All Articles