I have a custom UITableViewCell that its width is larger than UITableView's one (>1500px), user can scroll horizontally to show the whole cell.
I tried to set the contentSize.width of the table to match my cell's width but when I scroll the table view to the left, and when I reach a point higher than screen width, all information disappear and table become white.
您只需要在每个UITableViewCell内部使用一个UIScrollView。
我最终将表格视图放到UIScrollView中,并将其宽度设置为与最大UITableViewCell宽度匹配,然后将UIScrollView的内容宽度设置为与该宽度匹配,现在我可以水平滚动表格了,谢谢。
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.