how to set horizontal scrolling in UITableView by

2019-07-18 12:48发布

问题:

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?

回答1:

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.



回答2:

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