views:

94

answers:

2

First: No, none of the content should be loaded from the web. All content parts are shipped with the main bundle.

I have n images and mass of text (including lists). Instead of building all view parts programmatically in objective-c if was thinking of using an UIWebView and build "only" the HTML dynamically.

Does anything speaks against it? How does UIWebView work with local content?

Links and resources welcome.

Thanks

+1  A: 

I've thought about using web views in these situations sometimes, but then decided against it. 99% of the time, it's better to design the screen in Interface Builder. That will be as fast as or faster than creating an HTML page, and will give you all the benefits of elements functioning as expected (text input for example) and the possibility of customizing things programmatically. But of course, in many scenarios a web view might be the way to go (in fact, several standard UI elements have underlying web views).

Felixyz
Interface Builder is not an option since the content is highly dynamic. Sometimes 3 images, sometimes none. Sometimes with lists, sometimes headline, sometimes subheadline, etc...
aw
@aw: "...and the possibility of customizing things programmatically." Everything you can modify in a DOM, you can modify in a view loaded from a nib, only more easily. But again: web view *could* be the way to go.
Felixyz
Yap. Thanks Felix
aw
+1  A: 

I would not recommend using the WebView for building application UIs. It introduces many elements that may cripple the user experience. Well, it basically depends on the complexity of the UI.

I created an App UI in WebView myself, using JavaScript and all that advanced CSS animations/transforms that WebKit has to offer, but in the end it was not good for the consumer. My goal was to make the app skinnable, but if something goes wrong - for example in JS - the WebView is stuck, except you spend the time into building a WebView wrapper for your app that deals with this.

That said I, i don't know how complex your UI is going to be, but I would say using IB or building the UI in code with cocoa is still more efficient.

Regards, Erik

Erik Aigner