Just use XCDYouTubeVideoPlayerViewController. It seamlessly adds youtube video to your app without the need of UIWebView
.
It uses progressive download + MoviePlayer
and AVFoundation
frameworks. Just supply it with a youtube video ID and you are good to go.
It supports both full-screen & non full-screen and WORKS ON iOS SIMULATOR!!!
Example:
XCDYouTubeVideoPlayerViewController *videoPlayerViewController = [[XCDYouTubeVideoPlayerViewController alloc] initWithVideoIdentifier:@"9bZkp7q19f0"];
[self presentMoviePlayerViewControllerAnimated:videoPlayerViewController];