Today we go to present you a little class which will help us to reproduce youtube videos in out iPad apps.
The class basically is UIWebView with some html which incrustates youtube player.
You can use the player this way:
ZBYouTubeView *vid = [[ZBYouTubeView alloc] initWithFrame:self.bounds andUrl:@”http://www.youtube.com/watch?v=nmwIgF2gekY&feature=feedf”];
The player automatically will show an UIActivityIndicator while loading the video.
Also, if you change the frame of the view the video size will adapt to the new size.
Hope this will be useful for some of you.
Leave a Reply
You must be logged in to post a comment.