Inherits from IGGridViewSingleFieldMultiColumnDataSourceHelper : IGGridViewDataSourceHelper : NSObject
Declared in IGGridViewSingleFieldDynamicColumnDataSourceHelper.h

Overview

A derivative of IGGridViewSingleFieldMultiColumnDataSourceHelper this class essentially figures out the numberOfColumns automatically, instead of you having to specify. Just set the targetWidth for the column, and it will figure out how many columns can fit in a specific row automatically based on the width of the grid.

A field must be specified, as this is what will be displayed in each column.

For more information on dataSource helpers, please read the documentation on IGGridViewDataSourceHelper.

Properties

rowHeightAspectRatio

The aspect ratio that will be multipled by the actual column width, to set the height of all rows in the grid.

@property (nonatomic, assign) CGFloat rowHeightAspectRatio

Discussion

If you don't want the DSH to set the rowHeight set this to a NAN.

Declared In

IGGridViewSingleFieldDynamicColumnDataSourceHelper.h

targetColumnWidth

The width that the DataSourceHelper will use to calculate how many columns should be visible.

@property (nonatomic, assign) CGFloat targetColumnWidth

Declared In

IGGridViewSingleFieldDynamicColumnDataSourceHelper.h

Instance Methods

initWithField:targetColumnWidth:

Creates an IGGridViewSingleFieldMultiColumnDataSourceHelper to display your data.

- (instancetype)initWithField:(IGGridViewColumnDefinition *)field targetColumnWidth:(CGFloat)targetWidth

Parameters

field

A IGGridViewColumnDefinition that maps to the one property of your data that will be displayed in the IGGridView.

targetWidth

The width that the DataSourceHelper will use to calculate how many columns should be visible.

Return Value

Returns an initialized IGGridViewSingleFieldDynamicColumnDataSourceHelper object or nil if the object could not be successfully initialized.

Declared In

IGGridViewSingleFieldDynamicColumnDataSourceHelper.h

initWithField:targetColumnWidth:rowHeightAspect:

Creates an IGGridViewSingleFieldMultiColumnDataSourceHelper to display your data.

- (instancetype)initWithField:(IGGridViewColumnDefinition *)field targetColumnWidth:(CGFloat)targetWidth rowHeightAspect:(CGFloat)rowHeightAspectRatio

Parameters

field

A IGGridViewColumnDefinition that maps to the one property of your data that will be displayed in the IGGridView.

targetWidth

The width that the DataSourceHelper will use to calculate how many columns should be visible.

rowHeightAspectRatio

The aspect ratio that will be multipled by the actual column width, to set the height of all rows in the grid.

Return Value

Returns an initialized IGGridViewSingleFieldDynamicColumnDataSourceHelper object or nil if the object could not be successfully initialized.

Declared In

IGGridViewSingleFieldDynamicColumnDataSourceHelper.h