【发布时间】:2014-01-03 23:08:12
【问题描述】:
我正在创建一个包含 youtube 视频的应用。对于这个应用程序,我需要一种强制打开 youtube 视频的方法。如何强制启动?
我看过这个:
webView.userInteractionEnabled = NO;
但似乎无法弄清楚如何使用它。
这是代码:
stringUrl = [NSString stringWithFormat:@"http://www.youtube.com/watch?v=%@", youtubeId[0]];
headerTitle.text = [NSString stringWithFormat:@"%@", theTitle[0]];
NSURL *url = [NSURL URLWithString:stringUrl];
NSURLRequest *request = [NSURLRequest requestWithURL:url];
[self.webView loadRequest:request];
【问题讨论】:
-
见this问题。
-
因为您在这里使用的是 UIWebView 而不是 UIView,所以我认为您的问题是 actually a duplicate of this one here。
-
您是想在 mpmovie 播放器中播放 youtube 视频,还是想通过嵌入的 youtube url 在 webview 中打开它
-
在代码中你使用 webview 但你没有使用嵌入的 url
-
我想全屏打开它,就像你在我的 webview 中点击 youtube 视频一样。我认为那是mpmovieplayer
标签: objective-c