Oct 29, 2008

(iPhone) How to create an horizontal scrolling table

As we know the UITableView in the SDK allows to create a vertical scrolling table, but in my project i need a table which has horizontal scrolling. Why don't i create an UIScrollView, because i would like the header of table should be stable.

So what i do is create an UIScrollView which contains an UITableView, and the UIScrollView's contentsize equals the UITableView's size, then the UIScrollView won't do the vertical scrolling stuff.

There is one unconvenient thing when scroll verticaly, you should get the focus on the UITableView first, that means you should press on the screen to select a table cell and then scroll verticaly.

3 comments:

Jason said...

I think you can fix that problem by setting delaysContentTouches to NO on the scrollView

Nan said...

I'll try later.

Try said...

any one know the solution for above problem? please give me answer asap.