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?
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?
CGRect frame = tblView.frame;
tblView.transform = CGAffineTransformRotate(stressTblView.transform, M_PI / 2);
tblView.frame = frame;
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.
I don't think you can make a UITableView
scroll horizontally. My suggestion would be to use an UIScrollView
. UIScrollView
is a super class of UITableView
and gives you the scrolling behavior you expect from a UITableView
. What you don't get is the table cell management that makes UITableView
so convenient. Hence, you have to manage your own content. It is a little more work, but you get more control.
What you want to do is use a UIScrollView
and fill it left-to-right with "cell"-styled views.
I don't think that scroll horizontally is a good idea and probably violates the Apple's HIG.
Table view should not necessarily provide all the information but rather just some of the most important information, to view the information that requires a lot of space I suggest you do a detail view.