11

In this article, I am introducing OLEContainerScrollView, a UIScrollView subclass that allows you to add multiple scroll views, table views, or collection views to the same container.

Use Cases

You can use OLEContainerScrollView to achieve the following things:

  • Place multiple scroll views (or table views, or collection views) below each other so that their scrolling behavior still feels perfectly normal. In the case of table and collection views, the built-in cell reuse functionality is not affected.
  • Turn one complex UITableViewDataSource or UICollectionViewDataSource into multiple simple data sources by splitting a table or collection view with multiple sections into one view per section and placing them below each other.
  • Add header or footer views above or below a collection view without the need to have them managed by the collection view layout. These views can themselves be simple UIViews or UIScrollViews.

Read full article on oleb.net

OLEContainerScrollView on GitHub