- (void)embedInternalVideo:(CGRect)frame {
NSBundle *bundle = [NSBundle mainBundle];
NSString* html = @"<video src=\"sample_iPod.m4v\" width=640 height-480 controls autoplay></video>";
if (videoView == nil) {
videoView = [[UIWebView alloc] initWithFrame:frame];
[self.view addSubview:videoView];
}
[videoView loadHTMLString:html baseURL:[bundle resourceURL]];
}
//=======================
self.webView = [[[UIWebView alloc] initWithFrame:[[UIScreen mainScreen] applicationFrame]] autorelease];
NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:string]];
[self.webView loadRequest:request];
UIWebView的基本使用
最新推荐文章于 2022-08-21 14:02:22 发布