0

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.

2 Answers 2

2

You simply have to use a UIScrollView inside each UITableViewCell.

Sign up to request clarification or add additional context in comments.

1 Comment

I want the whole table to be scrolled not only a cell, UITableView is sub-class of UIScrollView, when I set the content size the horizontal scrolling is enabled, but when it reach a point greater than screen width table view becomes white.
1

I ended up putting the table view inside UIScrollView and set its width to match maximum UITableViewCell width, then set the content width of the UIScrollView to match this width, now I can scroll the table horizontally without any problem, thanks.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.