-1

I am developing port of application from android. In my application In one of screens I present to user collection of parameters grouped by sections. Every section is presented as page of tile items in spannable grid. User can scroll betwen sections horizontally like in pager while pages are not scrolled vertically. Additionally on top of screen user has clickable tabs showing all availible sections by title. On android I achieaved this by creating nested RecyclerViews (one lvl for sections, one for tiles), combined with DiffUtil for quick content updating. I am completly new in iOS development but I want to create something similar. After little dive into basic components it sems like UICollectionView might be the rightest joice. In my app I am trying to use MVVM approach using RxSwift and RxDataSource. The last one has support for sectioned UICollectionView and I wonder if there is any possibility to create the whole view by using single UICollectionView. Sections would scroll horizontal and every section would contain grid elements? Or maybe can I nest one RxDataSource in other. Or maybe I cant use RxDataSource for this and i should try something else. To make clear what I am talk about i include image

I would be very gratefull for any advice because I could not find anything usefull by my hand.

rmaddy
  • 314,917
  • 42
  • 532
  • 579

1 Answers1

0

I would set it up as:

  • UICollectionView (main)

    • UICollectionViewCell (single cell for whole screen - horizontal scroll)
      • UICollectionView (inside a cell)
        • UICollectionViewCell(s) (vertical scroll)

You can have a cell that takes a whole screen or is a small rectangle, it's up to you

Maciej Chrzastek
  • 1,380
  • 12
  • 18
  • Ok, What about RxDataSources? You have any experience or maybe saw some examples of usage in similar application? I am asking about that because whole content will be changing dynamically and I won't drop to much work on calculating changes, and redrawing between data updates – Maciej Grodzki Feb 25 '19 at 22:02