开发者

how to incorporate html files in an app

I have a objective c app that is a universal. I want for the ipad view, to be able to load some items (from a tableview) to be html files that are stored locally. I don't want to add a new separate library like phonegap. So what I'm trying to do, in case I wasn't clear, is to not use phonegap, but use apple func开发者_如何转开发tions to be able to load a web page locally.


You'll need to user UIWebViews. You can either give a UIWebView a file via URL (you can get a URL to a local file via [NSBundle mainBundle] URLForResource:@"index" withExtension:@"html] ) or you can give it a string to show. Have a look at the documentation: http://developer.apple.com/library/ios/#documentation/uikit/reference/UIWebView_Class/Reference/Reference.html

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜