我是这个领域的新手。我想打开我所拥有的静态HTML页面,以便如何在我的应用程序中打开该页面。
答案 0 :(得分:2)
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];
答案 1 :(得分:0)
请参阅UIWebView及其-loadRequest:
方法。