开发者

When to use UIWebView vs layout cocoa components?

开发者 https://www.devze.com 2023-01-01 05:44 出处:网络
When to use UIWebView other than supporting Rich Text开发者_高级运维?If you want to be able to update your layout without going through the apple store, you can use local html but update it occasional

When to use UIWebView other than supporting Rich Text开发者_高级运维?


If you want to be able to update your layout without going through the apple store, you can use local html but update it occasionally from your server.

If you need to be able to run javascript, you can use a UIWebView.

If you simply prefer html to interface builder or programmatic layout.

UIWebView also supports a few file formats besides html, like doc and ppt, but that might fall under the heading of rich text.


This depends on what you're displaying and how your app works. Generally, its used to 'preview' a url while remaining in your app (so your state is preserved - unlike launching mobile safari). Thought there are more advanced use cases of the UIWebView

In the case of vs cocoa components, Apple's taken a stance on rejecting so-called Cookie Cutter apps which are just fullscreen UIWebViews. If that is in fact your app, consider making an HTML5 application and bypass Objective-C/Cocoa all together.

0

精彩评论

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

关注公众号