how to set horizontal scrolling in UITableView by using interface builder?

我与影子孤独终老i 提交于 2020-01-15 01:23:57

问题


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



来源:https://stackoverflow.com/questions/5297362/how-to-set-horizontal-scrolling-in-uitableview-by-using-interface-builder

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!