ArmandsB ArmandsB - 10 months ago 69
iOS Question

Two UITableViews in one scrollview

I want to make

, which has 2
- one is content tableview, second is an comments section tableview.

Basically, It's an detail product VC, which has own
for own content and second
will be CommentsVC tableview.

Problem is that, I want to get them like one whole tableView (scroll together) (like 2 section style).

My first idea was to create
container, which contains both
, but I think that there will be problem with reusing cells.

Example sketch

Answer Source

When you take tableview inside scrollview it creates problem in scrolling i.e conflicting scrolls of both scrollview and tableview as UIScrollview is superview of UITableView .

So it's better to take one UITableView with different section. One Section for your content and another section for comments.