How to make a horizontal UI table view on iPhone?

前端 未结 9 1439
小鲜肉
小鲜肉 2020-12-25 13:59

Normally, the UITableView is something like this:

[   cell    1   ]
[   cell    2   ]
[   cell    3   ]
[   cell    4   ]

But I want to mak

相关标签:
9条回答
  • 2020-12-25 14:30

    Other than subclassing UIScrollView, you could try applying a 90 degree rotation to an existing UITableView. I have no idea how that will affect scrolling, however, and you would have to specialize the cell views to "unrotate."

    I think subclassing UIScrollView is a better option. Use the UITableView class as a guideline when it comes to the delegate, dataSource, and reusable cells.

    0 讨论(0)
  • 2020-12-25 14:32

    What you have is simply a standard table displayed in portrait orientation, but your are holding the phone in landscape mode. Rotate the contents of each cell 90 degrees and your there. And be sure to ignore any orientation change notifications.

    0 讨论(0)
  • 2020-12-25 14:36

    There's a project here that might be of some use as well, http://github.com/TheVole/HorizontalTable

    0 讨论(0)
提交回复
热议问题