2
votes

I want to implement a scrollview with different tables side by side. Similar to the one on the YouTube app where there are different tables for "About", "Suggested" and "Comments". I tried doing this by first adding individual tableViews to a UIScrollView. In this case the parents scrollView didn't scroll sideways even after I enabled paging. In my second attempt I tried making a tableView with 2 sections. But here, the different cells just got added as rows instead of getting added in a separate "page" or "column". Does anyone know how I can achieve this?

1
can you post a screen shot of what do you have and what do you want?Simone Pistecchia

1 Answers

1
votes

have you set the content-size of your "outer" scroll-view to the right dimensions?

For example if you have the horizontal setup of 3 table views you want to nest (as mentioned in your question: "About", "Suggested" and "Comments"), then the contentSize property of your UIScrollView must be set to 3 times the width of your nested view (i.e. the 3 UITableViews).

Check out the docs for UIScrollView and the contentSize property. Maybe also check out the ScrollViewSuite examples by Apple.