1

所以这会在应用程序启动时加载

NSString *youTubeVideoHTML = [NSString stringWithFormat:@"<html><head>"
"<meta name = \"viewport\" content = \"initial-scale = 1.0, user-scalable = no, width = 200\"/></head>"
"<body style=\"background:#FFFFF;margin-top:0px;margin-left:0px\">"
"<div><object width=\"320\" height=\"200\">"
"<param name=\"wmode\" value=\"transparent\"></param>"
"<embed src=\"http://www.youtube.com/v/%@&app=youtube_gdata\""
"type=\"application/x-shockwave-flash\" wmode=\"transparent\" width=\"320\" height=\"200\"></embed>"
"</object></div></body></html>", [[NSUserDefaults standardUserDefaults] objectForKey:@"detailVideoURL"]];
[self.webView loadHTMLString:youTubeVideoHTML baseURL:nil];

虽然webViewDidFinishLoad没有被调用,有没有人知道为什么会这样?,我已经添加了UIWebViewDelegate.

@interface DetailViewController : UIViewController <UIWebViewDelegate>
4

1 回答 1

1

要使用UIWebViewDelegateUIWebView委托与File's Owner... 连接的方法。在此处输入图像描述

于 2013-07-06T23:42:17.710 回答