Inherits from IGGridViewColumnDefinition : NSObject
Declared in IGGridViewColumnDefinition.h

Overview

IGGridViewImageColumnDefinition is an object that is used by the IGGridViewDataSourceHelper classes to identify properties that represent images.

This column definition supports 4 different type of data properties: - String url - NSURL - NSData object - UIImage object

The type of cell that is returned is of type IGGridViewImageCell.

You can use this class to configure how the image will load, and even whether to enable zooming.

Note: not all features are available for all images types. - cacheImages is only supported for url type images - loadAsync is only supported for properties of type UIImage and NSData - preloadImagePath must be a property type of UIImage or NSData, and much be the same type as the property this column definitions represents.

Tasks

Configuring the Column Definition

Image Loading Options

Properties

cacheImages

Gets or sets whether a url type image should be cached by the column definition, for faster loading times when the cell comes back into view.

@property (nonatomic, assign) BOOL cacheImages

Declared In

IGGridViewColumnDefinition.h

contentMode

Gets or sets the contentMode of the imageView

@property (nonatomic, assign) UIViewContentMode contentMode

Discussion

The default is: UIViewContentModeScaleAspectFit

Declared In

IGGridViewColumnDefinition.h

enableZooming

A value that determines if zooming is enabled on the IGGridViewImageCell

@property (nonatomic, assign) BOOL enableZooming

Discussion

See the IGGridViewImageCell’s enableZooming property for more information.

Declared In

IGGridViewColumnDefinition.h

fadeImageInterval

Gets or sets an interval for how long it should take to fade an image into view, once the cell becomes visible.

@property (nonatomic, assign) NSTimeInterval fadeImageInterval

Discussion

The default is 0, which means no animation.

Declared In

IGGridViewColumnDefinition.h

loadAsync

Gets or sets whther a NSData or UIImage should be loaded on a background thread

@property (nonatomic, assign) BOOL loadAsync

Declared In

IGGridViewColumnDefinition.h

propertyType

A value that describes the type of property that this column definitions represents. (readonly)

@property (nonatomic, assign, readonly) IGGridViewImageColumnDefinitionPropertyType propertyType

Declared In

IGGridViewColumnDefinition.h

textFieldKey

The name of the property that should be used to display text for the image provided.

@property (nonatomic, retain) NSString *textFieldKey

Declared In

IGGridViewColumnDefinition.h

textPadding

The amount of space between the text field and the image.

@property (nonatomic, assign) CGFloat textPadding

Declared In

IGGridViewColumnDefinition.h

Instance Methods

initWithKey:forPropertyType:

Creates an IGGridViewImageColumnDefinition for the specified property name.

- (instancetype)initWithKey:(NSString *)key forPropertyType:(IGGridViewImageColumnDefinitionPropertyType)type

Parameters

key

A string that maps to an actual image type property on your underlying data object.

type

A value that describes the type of property that this column definitions represents.

Return Value

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

Declared In

IGGridViewColumnDefinition.h