Possible Duplicate:
Horizontal UITableView
I need to make a UITableView horizontally scrollable. I have a custom table with width of 600 and as this is too larger. That table needs to be scrollable. How do I do this?
You can add a UITableView to a UIScrollView and have it scroll horizontally.
You need to reduce the height of UICollectionView to its cell / item height and select " Horizontal " from the " Scroll Direction " as seen in the screenshot below. Then it will scroll horizontally depending on the numberOfItems you have returned in its datasource implementation.
have a look at this https://github.com/alekseyn/EasyTableView
This should solve your problems.
For anyone who runs across this question, contrary to some of the other advice provided, horizontal scrolling of a UITableView is possible and is not a violation of the HIG. If it was, why would Apple provide the ability to scroll horizontally at all?
The way to get this to work correctly is to only set the ContentSize, not the FrameSize. I am a MonoTouch programmer, so I am not sure what the exact equivalent in objective-c is, but the way we address this is to create a custom class inherited from UITableView and override the LayoutSubviews method. In this method, we calculate and set the current ContentSize.
This approach catches all of the potential cases that we have found where the ContentSize could be reset, including rotating the device, scrolling, and zooming.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With