I have embed 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 app. And when I hit the Play button on the utudeWebView it shows a fullscreen like this:
where the Red Controller Bar on top is not looking good.Could somebody tell me how can I change the color of that bar?
Any suggestions will be appreciated. Thanks in advance,
John
I figured out why was it red now.
In my AppDelegate, I have set the appearance of NavigationBar:
[[UINavigationBar appearance] setTintColor:[UIColor redColor]];
I didn't notice the relationship between navigationBar and video control bar because I had my navigationBar set hidden.
Somehow, the setting of navigationBar's color would also affect the color of the MPmoviePlayerController's control bar. So setting the NavigationBar's Tint Color, I could change the color of the control bar. Here are some examples: