开发者

How to stop a UITableview from scrolling horizontally?

开发者 https://www.devze.com 2023-01-22 02:58 出处:网络
For some reason my iOS UITableView is scrolling horizontally. Any ideas why this may happen? Thanks. Edit: It seems to be the开发者_StackOverflow中文版 result of repositioning the table in code with

For some reason my iOS UITableView is scrolling horizontally. Any ideas why this may happen?

Thanks.

Edit: It seems to be the开发者_StackOverflow中文版 result of repositioning the table in code with screen reorientation. So I guess the question is: how do I reposition the table and not get the horizontal/diagonal scrolling?


In IB - in the Inspector for the UIScrollView, there is an option for "Scrollers" - with checkboxes for "Vertical" and "Horizontal". You can check/uncheck these to enable/prohibit scrolling on these axises.

Perhaps the larger issue at hand is that you need to resize your views to match the screen orientation, so that you don't wind up with a mismatch between the viewable rectangle and the scroll rectangle.

0

精彩评论

暂无评论...
验证码 换一张
取 消