3
我一个在这个新Field.I要打开静态HTML网页,其中我有,所以我怎么能在我的应用程序中打开该网页。如何在我的Native应用程序中打开HTML页面?
我一个在这个新Field.I要打开静态HTML网页,其中我有,所以我怎么能在我的应用程序中打开该网页。如何在我的Native应用程序中打开HTML页面?
NSBundle *bundle = [NSBundle mainBundle];
NSString *htmlTemplateLink = [bundle pathForResource:@"infopage" ofType:@"html"];
NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL fileURLWithPath:htmlTemplateLink]];
wview=[[UIWebView alloc]initWithFrame:CGRectMake(0, 0, 320, 460)];
wview.scalesPageToFit = YES;
[wview loadRequest:request];
wview.delegate=self;
//wview.multipleTouchEnabled=YES;
wview.userInteractionEnabled=YES;
[self.view addSubview:wview];
见UIWebView及其-loadRequest:
方法。
有关可能的话这个话题的任何示例代码? – 2010-06-04 08:38:18
当然,搜索谷歌的“uiwebview示例”。 – 2010-06-04 08:42:21