how to set horizontal scrolling in UITableView by

2019-07-18 12:54发布

I have UITableView in my app with 2 columns.I can read column 1 and half of column 2.My questions are- can we add horizontal scroll by use of interface builder in uitableview so i can read column 2 for all cells in table?

should we have to add some code for that too or its only possible with interface builder?

2条回答
smile是对你的礼貌
2楼-- · 2019-07-18 13:30

First, the row in the UITableView doesn't scrolls itself inside the UITableView. My solution (I know someone will come out with something better) Is to use an UIScrollView and then inside add the UITableView. This UIScrollView will have the same size that your UITableView have now, but the UIScrollView contentSize property will have the same height but it would have a greater width. enter image description here

查看更多
放荡不羁爱自由
3楼-- · 2019-07-18 13:34

you cannot add two columns to UITableView. What i understand is to solve the above problem is create two table view side by side. write code or interface builder as per your requirement

查看更多
登录 后发表回答