I have a chat on a web site that looks like this.

I am now building an iPhone app for this and have some problems creating the same layout. I hope you can point me in the right direction. Is subviews or webviews the best choice?
-
If using UIView, UILabel and UIImage, what is the best way to make rounded corners and the little arrow. The gradient background should not scroll with the table view. What’s the easiest way to calculate the hight of each message? What is the best way to async load the images over http?
-
If using a webview, what is the best way to populate it with data? Building string? Having a template and populate the image, username, time and message thru JavaScript? How can I resize the UITableCell and UIWebView to fit the contests?
Will a table full of UIWebView be much slower than using labels? Will I need to create it twice to return the height of the cell in heightForCellAtIndexPath and add it in cellForRowAtIndexPath?
Thanks for your help!
If you wish to see it live, visit http://www.aktieguiden.com
This is really a lot more than two questions, and I’ll answer several of them.
I would use a table view with a resizable UIImage and a UITextView for each bubble. Use an image of the bubble in png with a transparent background, and make it resizable. Import it with UIImage’s
-(UIImage*)resizableImageWithCapInsets:(UIEdgeInsets)capInsets. To determine a height, UITextView has acontentSizeproperty which will tell you the size of the view that can be scrolled. For asynchronous loading, use one of the many tutorials or frameworks for that purpose. Here is one:http://developers.enormego.com/view/what_if_images_on_the_iphone_were_as_easy_as_html