开发者

display local html file with css in iphone..?

I want to display local html file that has css too in UIWebView. I am able to do that using following code..

NSURL *baseUrl = [NSURL fileURLWithPath:[[NSBundle mainBundle] bundlePath]];

NSString *path = [[NSBundle mainBundle] pathForResource:@"info" ofType:@"html"];

NSString *htmlString = [NSString stringWithContentsOfFile:path];
[webView loadHTMLString:htmlString baseURL:baseUrl];

I am not able to get hover effects and my understanding is my be there is no hover kind of thing in a touch mobile,

Any ways my main issue is I had deleted my index.html from resources and then re added the updated one but not getting the updated one..

I don't know what happen the web view still loads the old html file. I tried to clean project too.

开发者_JAVA技巧Second thing can I get css effects in iphone..?

Thanks..


As far as I know you can only achieve this result by using javascript-events like ontouchstart (or something).


I believe if you reset your simulator (While running your simulator, go to iOS Simulator > Reset Content and Settings in the menu bar) then re-run your app, the UIWebView will load the new index.html. UIWebViews cache these things, so you can add code to clear that cache and/or ignore the cache. Check here: Clearing UIWebview cache

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜