views:

36

answers:

1

For an iPhone app, I'm going to need to display read-only tabular data in a grid format. This data could potentially have many rows and columns.

I could use UITableView, but the problem is the data will most likely be very wide and require scrolling.

Is there a way to put a UITableView in a UIScrollView and allow zooming and scolling x and y, but still take advantage of reusable UITableView cells? I assume putting a huge UITableView in a UIScrollView would not take advantage of the cell reuse (virtualization).

Or am I better off using UIWebView and a HTML table?

+1  A: 

A webView with HTML tables would likely use more memory, but end up being a lot easier to code and debug than 2D cells inside a tableView inside a scrollView.

Another option for a really large table might be a tiled scrollView where you only render the visible tiles (and release and/or reuse the offscreen tiles).

hotpaw2
I think I am going to compare the performance of each. Is there an example out there for going the native iPhone route? HTML should be pretty simple.
Jonathan.Peppers
I got it to work natively, wasn't too difficult. Used an outer UIScrollView for zooming and h-scrolling only, while UITableView handles scrolling vertically. This allows table cells to be reused effectively. I was also able to use the header of the UITableView to display a nice "sticky" column header.
Jonathan.Peppers
I'm mark you as the answer, as it was the only help.
Jonathan.Peppers