2013-05-26 3 views
4

UIWebView를 사용하여보기에 YouTube를 내장했습니다.iOS - 전체 화면 모드에서 Youtube Player 컨트롤 막대 색상

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

YouTube URL은 내 앱에 잘 삽입되어 있습니다. 상단의 레드 컨트롤러 바 good.Could 누군가가 말해보고되지

enter image description here

어떻게 내가 그의 색상을 변경할 수 있습니다 : 나는 utudeWebView에서 재생 버튼을 누르면 때 그것은이 같은 전체 화면을 보여줍니다 바?

모든 의견을 환영합니다. 미리 감사드립니다,

John

답변

6

나는 그것이 왜 지금 빨간색인지 알아 냈습니다. 내 내비게이션 바 세트가 숨겨져 있었기 때문에

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

내가 내비게이션 바 및 비디오 컨트롤 막대 사이의 관계를 인식하지 않았다

내 AppDelegate에, 나는 내비게이션 바의 모양을 설정했습니다.

어떻게 든 navigationBar의 색상 설정은 MPmoviePlayerController 컨트롤 막대의 색상에도 영향을줍니다. NavigationBar의 색조 색을 설정하여 컨트롤 막대의 색을 변경할 수 있습니다. 다음은 몇 가지 예는 다음과 같습니다

enter image description here

enter image description here

관련 문제