Play with changing transparent to any color / alpha for webView.backgroundColor and html <body> css style to find the combination that you like best. Example with loadHTMLString :
- (void)embedYouTubeWithVideoID:(NSString *)videoID { webView.backgroundColor = [UIColor clearColor]; CGFloat w = webView.frame.size.width; CGFloat h = webView.frame.size.height; NSString *ytUrlString = [NSString stringWithFormat:@"http://www.youtube.com/v/%@&version=3&autohide=1&autoplay=1&cc_load_policy=1&fs=1&hd=1&modestbranding=1&rel=0&showsearch=0", videoID]; NSString *embed = [NSString stringWithFormat:@"\ <html>\ <head>\ <meta name=\"viewport\" content=\"initial-scale = 1.0, user-scalable = no, width = %0.0f\"/>\ </head>\ <body style=\"background:transparent; margin-top:0px; margin-left:0px\">\ <div>\ <object width=\"%0.0f\" height=\"%0.0f\">\ <param name=\"movie\" value=\"%@\" />\ <param name=\"wmode\" value=\"transparent\" />\ <param name=\"allowFullScreen\" value=\"true\" />\ <param name=\"quality\" value=\"high\" />\ <embed src=\"%@\" type=\"application/x-shockwave-flash\" allowfullscreen=\"true\" allowscriptaccess=\"always\" wmode=\"transparent\" width=\"%0.0f\" height=\"%0.0f\" />\ </object>\ </div>\ </body>\ </html>", w, w, h, ytUrlString, ytUrlString, w, h]; [webView loadHTMLString:embed baseURL:nil]; }
chown source share