AdvancedCollectionView icon indicating copy to clipboard operation
AdvancedCollectionView copied to clipboard

Is there a way to show flow (grid) layout?

Open mixtly87 opened this issue 9 years ago • 1 comments

For example, when you enter Cat details, there are two segments:

  1. Details,
  2. Sightings

Imagine sightings is some kind of grid. Can that be done? All I see is tableview mimic.

mixtly87 avatar Nov 07 '15 23:11 mixtly87

Yes there is. On your dataSource which is in AAPLSegmentedDataSource, you can (usually in viewDidLoad): dataSource.defaultMetrics.numberOfColumns = 3; dataSource.defaultMetrics.showsColumnSeparator = YES; dataSource.defaultMetrics.showsRowSeparator = YES;

If your row height and columns count depend on collection-view frame, you can set those and additional options in viewWillLayoutSubviews.

mcicak avatar Nov 08 '15 09:11 mcicak