How can I open an HTML page in my native application?

i new in this field. I want to open the static HTML page that I have, since I can open this page in my application.

+3
source share
2 answers
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];
+2
source
0
source

Source: https://habr.com/ru/post/1748478/


All Articles