Ankit Vyas
Ankit Vyas

Reputation: 7501

How i can open HTML page in my Native application?

i an new in this Field.I want to open static HTML page which i have so how can i open that page in my application.

Upvotes: 3

Views: 535

Answers (2)

Ankit Vyas
Ankit Vyas

Reputation: 7501

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

Upvotes: 2

Alex Reynolds
Alex Reynolds

Reputation: 96974

See UIWebView and its -loadRequest: method.

Upvotes: 0

Related Questions