开发者

how to load an html file locally into the uiwebview

开发者 https://www.devze.com 2023-01-16 10:53 出处:网络
i am having problem with how to get the uiwebview loaded with local html file .provide the cod e as well i am having the hmtl file as fp_dis-1.html.

i am having problem with how to get the uiwebview loaded with local html file .provide the cod e as well i am having the hmtl file as fp_dis-1.html. thanks开发者_Python百科 in advance


Try this,

UIWebView *page;

[page loadRequest:[NSURLRequest requestWithURL:[NSURL fileURLWithPath:[[NSBundle mainBundle] pathForResource:@"your-local-file-url" ofType:@"html"]isDirectory:NO]]];
0

精彩评论

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