开发者

How i can open HTML page in my Native application?

开发者 https://www.devze.com 2023-01-02 00:31 出处:网络
i an new in this Field.I want to o开发者_开发知识库pen static HTML page which i have so how can i open that page in my application. NSBundle *bundle = [NSBundle mainBundle];

i an new in this Field.I want to o开发者_开发知识库pen static HTML page which i have so how can i open that page in my application.


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];


See UIWebView and its -loadRequest: method.

0

精彩评论

暂无评论...
验证码 换一张
取 消