title: YouTube video playback broken on iOS6 (works fine on iOS5)
body: <p>In my app, I have a button which, when pressed, lets you watch a youtube video (a movie trailer). Within the app, without launching safari. Below you can see a code snippet. This code works pefrectly fine under iOS5. However, in iOS 6, the UIButton in findButtonInView is always nil. Any ideas what might be the reason?</p>
  
  <pre><code>youtubeWebView.delegate = self;
  youtubeWebView.backgroundColor = [UIColor clearColor];
  
  NSString* embedHTML = @" &lt;html&gt;&lt;head&gt; &lt;style type=\"text/css\"&gt; body {background-color: transparent;  color: white; }&lt;/style&gt;&lt;/head&gt;&lt;body style=\"margin:0\"&gt;&lt;embed id=\"yt\" src=\"%@?version=3&amp;app=youtube_gdata\" type=\"application/x-shockwave-flash\"width=\"%0.0f\" height=\"%0.0f\"&gt;&lt;/embed&gt;&lt;/body&gt;&lt;/html&gt;";
  
  NSURL *movieTrailer;
  
  if(tmdbMovie) movieTrailer = tmdbMovie.trailer;
  
  else movieTrailer = [NSURL URLWithString:movie.trailerURLString];
  
  NSString *html = [NSString stringWithFormat:embedHTML,
                                              movieTrailer,
                                              youtubeWebView.frame.size.width,
                                              youtubeWebView.frame.size.height];
  
  [youtubeWebView loadHTMLString:html baseURL:nil];
  
  [self addSubview:youtubeWebView];
  
  
  - (void)webViewDidFinishLoad:(UIWebView *)_webView {
  
      isWatchTrailerBusy = NO;
  
      [manager displayNetworkActivityIndicator:NO];
  
      //stop the activity indicator and enable the button
  
       UIButton *b = [self findButtonInView:_webView];
  
      //TODO this returns null in case of iOS 6, redirect to the youtube app
  
      if(b == nil) {
  
          NSURL *movieTrailer;
  
          if(tmdbMovie) {
              movieTrailer = tmdbMovie.trailer;
          } else {
              movieTrailer = [NSURL URLWithString:movie.trailerURLString];
          }
  
          [[UIApplication sharedApplication] openURL:movieTrailer];
  
      } else {
          [b sendActionsForControlEvents:UIControlEventTouchUpInside];
      }
  }
  
  
  - (UIButton *)findButtonInView:(UIView *)view {
  
      UIButton *button = nil;
      if ([view isMemberOfClass:[UIButton class]]) {
          return (UIButton *)view;
      }
  
      if (view.subviews &amp;&amp; [view.subviews count] &gt; 0) {
  
          for (UIView *subview in view.subviews) {
              button = [self findButtonInView:subview];
              if (button) return button;
          }
      }
  
       return button;
  }
  </code></pre>