开发者

how to incorporate html files in an app

开发者 https://www.devze.com 2023-01-29 10:50 出处:网络
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 l

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

精彩评论

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