所以这会在应用程序启动时加载
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>