Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What's the best layout for a scrollable iPhone "detail view" with variable content?

Tags:

I'm building a navigation controller based iPhone application and am curious how to go about building the detail view for my application. The part that's complicating my endeavor is: What UI elements/hierarchy should I employ to create a variable-height yet scrollable detail view?

A great example of my goal is an arrangement like the mobile App Store detail view. The horizontal divisions between the heading, description, screenshot, etc leads me to believe it's a table view in disguise, but that's just a guess.

Currently, I'm using a UIScrollView for my detail view, but since I can never be sure of the exact length of my incoming content, my description view ends up with either unused space or truncated text. Is there some set of elements that would be best suited for displaying this variable-height content in "blocky" format (like the example) while still maintaining overall view scroll-ability?

Thanks in advance for your assistance!

like image 283
Collin Allen Avatar asked Feb 23 '09 02:02

Collin Allen


1 Answers

If you want to be able to easily format complex content you can use a UIWebView. What I basically do is create an HTML template and add it as a resource. At run time I load the content of this HTML doc and do string replacement to add the content I want. Within the HTML I place placeholders like

<div><!-- ARTICLE_TITLE --></div>
like image 181
nduplessis Avatar answered Nov 15 '22 04:11

nduplessis