【发布时间】:2014-06-15 04:36:37
【问题描述】:
在我的应用程序中,我想播放 N 个 utube 视频,我的服务器中有一组 YouTube url,所以现在我想在我的 UITableView 中查看 utube 视频,一旦用户单击它必须播放的单元格详细视图中的特定视频。
我使用HCYoutubeParser 播放YouTube 视频,而没有使用UIWebView,也没有重定向到utube。现在我在这里遇到了一些问题
我已使用NSObject 从服务器获取URL 和标题,我正在使用setDataSource 方法查看视频。
我的setDataSource 代码
-(void)setDataSource:(videopolitical *)inVideosObj
{
self.title.text = inVideosObj.title;
NSDictionary *videos = [HCYoutubeParser h264videosWithYoutubeURL:[NSURL URLWithString:inVideosObj.video]];
MPMoviePlayerViewController *mp = [[[MPMoviePlayerViewController alloc] initWithContentURL:[NSURL URLWithString:[videos objectForKey:@"medium"]]] autorelease];
[self presentViewController:mp animated:YES completion:nil];
}
在上述代码的最后一行[self presentViewController:mp animated:YES completion:nil]; 中,它显示出类似警告。
Instance method' - presentViewController:animated:completion:'not found(return type defaults to 'id')
请告诉我如何解决这个问题以及如何在UITableView 中播放一系列 utube 视频
【问题讨论】:
标签: ios uitableview youtube