开发者

When to use UIWebView vs layout cocoa components?

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜