Inherits from UIScrollView
Conforms to NSCoding
Declared in IGGridView.h

Overview

A grid view is a single or multiple column view, which allows users to scroll through rows and cells both vertically and horizontally. The cells comprising the individual items of the grid are IGGridViewCellBase objects. These objects represent a specific column and row that users can insert, delete, and reorder, both on the invdiual cell level or row level.

A grid view is made up of zero or more sections, each with its own rows. Sections are identified by their index number within the grid view, rows are identified by their index number within a section and columns are identified by their index within a row. Any section can be optionally be preceded by a section header, and optionally followed by a section footer.

Grid views can have one of two styles, IGGridViewStyleDefault and IGGridViewStyleSingleCellPaging. When you create an IGGridView instance you must specify a grid style, and this style cannot be changed. If no style is chosen, the default style will be used. In the default style, cells and rows size to their column widths and row heights, and sections can display headers and footers. The single cell paging style, will only display a single cell sized to the size of the grid’s viewport. This type of style is useful for applications that would want to display one item at a time, such as an image viewer or a document reader.

Many methods of the IGGridView take IGRowPath or IGCellPath objects as parameters and return values. You can use the pathForRow:inSection: static method to create an IGRowPath and the the cellPathForRow:inSection:inColumn: static method to create an IGCellPath.

A IGGridView object must have an object that acts as a data source and an object that acts as a delegate; typically these objects are the application delegate. The data source must adopt the IGGridViewDataSource protocol and the delegate must adopt the IGGridViewDelegate protocol. The data source provides information that the grid view needs to construct tables and manages the data model when rows or cells of a table are inserted, deleted, or reordered. The delegate provides the cells used by the grid and performs other tasks, such as selection. To shorten development time you can take advantage of the IGGridViewDataSourceHelper object which simplifies the creation of cells and data management. There are a few different implementations of the data source helpers such as IGGridViewSingleRowSingleFieldDataSourceHelper and IGGridViewSingleFieldMultiColumnDataSourceHelper which offer different ways to display your linear data, such as treaing every row as a column.

IGGridView caches cells only for visible rows, but caches row, header, and footer heights for the entire grid. You can create custom cells by deriving from IGGridViewCellBase.

IGGridView calls reloadData only when you create a new instance of the IGGridView or when you assign a new data source. Reloading the grid view clears current state, including the current selection. If you would like to keep state, but refresh the current data that is being displayed in the grid view, you can call updateData.

To display a shortcut bar in the grid view, your datasource must implement the following methods:sectionIndexTitlesForGridView: gridView:sectionForSectionIndexTitle:atIndex:. You can then customize the appearance of the shortcut bar using the following properties of the grid view: shortcutBarColumnBackgroundView, shortcutBarColumnWidth and shorcutBarColor

To implement a pull down to refresh mechanism similar to apps such as Facebook, your delegate must implement the updateRequestedInGridView: method. When you’re done with refreshing you can then invoke the finishedUpdating method on the grid view. To control the height of the pull down you can set the pullDownRowHeight property of the grid view. To customize the content displayed in the pull down view you can implement the pullDownCellForGridView: method on your datasource.

Tasks

Initializing a IGGridView Object

Configuring a Grid View

Section Configuration

Row Configuration

Column Configuration

Managing Selections

Accessing Cells and Rows

Scrolling the Grid View

Inserting, Deleting, and Moving: Rows, Cells, and Columns

Reloading the Grid View

Managing the Delegate and the Data Source

  •   dataSource

    The object that acts as the data source of the grid view.

    property
  •   delegate

    The object that acts as the delegate of the grid view.

    property

Shortcutbar

Pulldown Row

  •   pullDownRowHeight

    Sets the height of the pull down row.

    property
  • – finishedUpdating

    Tells the grid view that it no longer needs to be in the update state, and should update it’s data and go back to normal.

Filtering

Fixed Columns

Properties

allowHorizontalBounce

Sets whether the grid view will be allowed to be scrolled outside it’s bounds horizontally.

@property (nonatomic, assign) BOOL allowHorizontalBounce

Discussion

When a grid view’s total column width is wider than the viewport of the grid view the user can be allowed to scroll the columns beyond their bounds. The default value is NO which means that even though the user tries to scroll outside the bounds of the columns, they’ll only move to the extent of the viewport.

Declared In

IGGridView.h

allowsMultipleSelection

A Boolean value that determines whether users can select more than one row or cell.

@property (nonatomic, assign) BOOL allowsMultipleSelection

Discussion

When this property is YES rows or cells are selected until that particular row or cell is pressed again.

Declared In

IGGridView.h

backgroundView

The background view of the grid view.

@property (nonatomic, retain) UIView *backgroundView

Discussion

A grid view’s background view is automatically resized to match the size of the grid view. The view is placed as a subview of the grid view behind all cells, header views and footer views.

Declared In

IGGridView.h

cellContentInset

Sets UIEdgeInset for the content of all IGGridViewCell objects in the grid view.

@property (nonatomic, assign) UIEdgeInsets cellContentInset

Discussion

Use this property to set the inset of the content of a cell. This property should not be set when the style of the grid view is set to IGGridViewStyleSingleCellPaging. The default is (5, 5, 10, 10).

Declared In

IGGridView.h

columnResizing

Sets the IGGridViewColumnResizeAction that determines how a column can be resized in the UI

@property (nonatomic, assign) IGGridViewColumnResizeAction columnResizing

Discussion

IGGridViewColumnResizeActionNone – No UI interactions for resizing columns IGGridViewColumnResizeActionPinch – Pinch gestures on a column will resize it. IGGridViewColumnResizeActionAdorner – Tap a column header, and an adorner will appear, so that you can resze the column. Headers must be visible.

Declared In

IGGridView.h

columnResizingAdornerColor

Sets the color of the adorner used for resizing a column when the columnResizing property is set to IGGridViewColumnResizeActionAdorner.

@property (nonatomic, retain) UIColor *columnResizingAdornerColor

Declared In

IGGridView.h

columnSpacing

Sets the spacing that should be appended to the right of each cell.

@property (nonatomic, assign) CGFloat columnSpacing

Discussion

Use this property if you need to apply additional spacing between columns.

Declared In

IGGridView.h

columnWidth

Sets IGColumnWidth for every column in the grid view.

@property (nonatomic, retain) IGColumnWidth *columnWidth

Discussion

To set the width of individual columns use the delegate’s gridView:widthForColumnAtIndex: method.

Declared In

IGGridView.h

dataSource

The object that acts as the data source of the grid view.

@property (nonatomic, assign) id<> dataSource

Discussion

The data source must adopt the IGGridViewDataSource protocol.

Declared In

IGGridView.h

delegate

The object that acts as the delegate of the grid view.

@property (nonatomic, assign) id<> delegate

Discussion

The data source must adopt the IGGridViewDelegate protocol.

Declared In

IGGridView.h

deleteButtonFont

The font that will be used for the swipeToDelete button.

@property (nonatomic, retain) UIFont *deleteButtonFont

Discussion

The default is nil.

Declared In

IGGridView.h

emptyRows

Sets whether empty rows should be appended to the end of the grid view.

@property (nonatomic, assign) BOOL emptyRows

Discussion

When set to YES the grid view will append empty rows to itself. If the delegate’s gridView:heightForRowAtPath: method is implemented the grid view will not display any empty rows, regardless of the value of this property. The default is YES.

Declared In

IGGridView.h

filterAction

Tells the grid view when it should apply the filter.

@property (nonatomic, assign) IGGridViewFilterAction filterAction

Discussion

IGGridViewFilterActionImmediate - After each key press.
IGGridViewFilterActionDoneEditing - When the user finishes typing.

The default is IGGridViewFilterActionImmediate.

Declared In

IGGridView.h

filterRowHeight

Sets the height of the search box in the grid view.

@property (nonatomic, assign) CGFloat filterRowHeight

Discussion

The filter row will only appear if the data source’s supportsFilteringInGridView: method returns true.

Declared In

IGGridView.h

fixedLeftColumnSeparatorColor

Sets the UIColor of the separator of the left fixed column.

@property (nonatomic, retain) UIColor *fixedLeftColumnSeparatorColor

Discussion

The default is gray.

Declared In

IGGridView.h

fixedLeftColumnSeparatorWidth

Sets the width of the separator for the left fixed columns.

@property (nonatomic, assign) CGFloat fixedLeftColumnSeparatorWidth

Discussion

To this separator set the width to zero. The default value is 4.

Declared In

IGGridView.h

fixedRightColumnSeparatorColor

Sets the UIColor of the separator of the right fixed column.

@property (nonatomic, retain) UIColor *fixedRightColumnSeparatorColor

Discussion

The default is gray.

Declared In

IGGridView.h

fixedRightColumnSeparatorWidth

Sets the width of the separator for the right fixed columns.

@property (nonatomic, assign) CGFloat fixedRightColumnSeparatorWidth

Discussion

To this separator set the width to zero. The default value is 4.

Declared In

IGGridView.h

headerBackgroundColor

Sets the UIColor of the background of header cells.

@property (nonatomic, retain) UIColor *headerBackgroundColor

Discussion

The default is black. This value is only used when the delegate’s gridView:headerCellAt: method is not implemented.

Declared In

IGGridView.h

headerFont

Sets the UIFont of the text of header cells.

@property (nonatomic, retain) UIFont *headerFont

Discussion

The default is nil. This value is only used when the delegate’s gridView:headerCellAt: method is not implemented.

Declared In

IGGridView.h

headerHeight

Sets the height of the header in the grid view.

@property (nonatomic, assign) CGFloat headerHeight

Discussion

The header will only apper if the style of the grid view is set to IGGridViewStyleDefault. To remove the header from the grid view set the height of the header to zero. The default value is 50.

Declared In

IGGridView.h

headerTextColor

Sets the UIColor of the text of header cells.

@property (nonatomic, retain) UIColor *headerTextColor

Discussion

The default is white. This value is only used when the delegate’s gridView:headerCellAt: method is not implemented.

Declared In

IGGridView.h

infiniteScrolling

Sets whether the grid can continuously be scrolled without ever hitting an end, as the columns and rows will repeated.

@property (nonatomic, assign) IGGridViewInfiniteScrolling infiniteScrolling

Declared In

IGGridView.h

pullDownRowHeight

Sets the height of the pull down row.

@property (nonatomic, assign) CGFloat pullDownRowHeight

Discussion

The pull down row is a row that appears above the grid view, and can be seen when pulling the grid view down beyond its bounds. The height set, determines how far the pull down needs to be pulled before it switch from it’s pull down state, to it’s release state, and how much space it will take up in it’s updating state.

Declared In

IGGridView.h

rowBackgroundColor

Sets the UIColor for the background of the row.

@property (nonatomic, retain) UIColor *rowBackgroundColor

Discussion

The default is clear.

Declared In

IGGridView.h

rowHeight

Sets the height of all rows in the grid view.

@property (nonatomic, assign) CGFloat rowHeight

Discussion

If the delegate’s gridView:heightForRowAtPath: method is implemented this property will not be used.

Declared In

IGGridView.h

rowReordering

A Boolean value that determines if the row reordering indicator is visible in the grid view.

@property (nonatomic, assign) BOOL rowReordering

Discussion

To animate the indicator into view, use the setRowReordering:animated: method.

The dataSource must implement the following methods in order for this property to be set to YES.

canReorderRows:gridView; - must return YES
gridView:canMoveRowAtPath: - if returns now, no indicator will appear for that row.
gridView:moveRowAtPath:toPath:

Declared In

IGGridView.h

rowReorderingColumnWidth

A float value that determines the width of the column used to display the row reordering indicators.

@property (nonatomic, assign) CGFloat rowReorderingColumnWidth

Declared In

IGGridView.h

rowSeparatorColor

Sets the UIColor of the row separator.

@property (nonatomic, retain) UIColor *rowSeparatorColor

Discussion

The default is gray. This value is only used when the delegate’s gridView:viewForRowSeparatorAtPath: method is not implemented.

Declared In

IGGridView.h

rowSeparatorHeight

Sets the height of the separator for each row.

@property (nonatomic, assign) CGFloat rowSeparatorHeight

Discussion

To remove row separators set the height to zero. The default value is 2.

Declared In

IGGridView.h

rowSpacing

Sets the spacing that should be appended to each row.

@property (nonatomic, assign) CGFloat rowSpacing

Discussion

Use this property if you need to apply additional spacing between rows.

Declared In

IGGridView.h

sectionColumnBackgroundView

Sets the background view of the fixed column used for displaying a section’s custom content.

@property (nonatomic, retain) UIView *sectionColumnBackgroundView

Discussion

When the delegate’s gridView:viewForSectionColumn: is implemented, this specified view is used as a background for the column used to display the specified content. This background view is sized to the available viewport determined by the frame of the grid view and the sectionColumnWidth

Declared In

IGGridView.h

sectionColumnContentColor

Sets the color of the content area of the Section column.

@property (nonatomic, retain) UIColor *sectionColumnContentColor

Discussion

The content area is the area in which the views specified in viewForSectionColumn: will be displayed. The default value is clear;

Declared In

IGGridView.h

sectionColumnWidth

Sets the width of custom section content.

@property (nonatomic, assign) CGFloat sectionColumnWidth

Discussion

When the delegate’s gridView:viewForSectionColumn: is implemented, another column is exposed to display the specified view’s content. This property allows the developer to control the width of this fixed column.

Declared In

IGGridView.h

sectionFooterHeight

Sets the height of the footer for all sections in the grid view.

@property (nonatomic, assign) CGFloat sectionFooterHeight

Discussion

This value is only used if the delegate’s gridView:heightForFooterInSection: is not implemented.

Declared In

IGGridView.h

sectionHeaderHeight

Sets the height of the header for all sections in the grid view.

@property (nonatomic, assign) CGFloat sectionHeaderHeight

Discussion

This value is only used if the delegate’s gridView:heightForHeaderInSection: is not implemented.

Declared In

IGGridView.h

selectionType

Sets whether selection should be for rows, cells or if there should be no selection at all.

@property (nonatomic, assign) IGGridViewSelectionType selectionType

Discussion

There are three valid values

IGGridViewSelectionTypeRow - only rows will be selected. 
IGGridViewSelectionTypeCell - only cells will be selected.
IGGridViewSelectionTypeNone - no selection will occur.

Declared In

IGGridView.h

shortcutBarColor

Sets UIColor of the shortcut bar

@property (nonatomic, retain) UIColor *shortcutBarColor

Discussion

The default is white. This is the color of the shortcut bar itself and not the color of the background of the column the shortcut bar is in.

Declared In

IGGridView.h

shortcutBarColumnBackgroundView

Sets the background view of the fixed column used for displaying the shortcut bar.

@property (nonatomic, retain) UIView *shortcutBarColumnBackgroundView

Discussion

This background view is sized to the available viewport determined by the frame of the grid view and the shortcutBarColumnWidth

Declared In

IGGridView.h

shortcutBarColumnWidth

Sets the width of the column for the shortcut bar.

@property (nonatomic, assign) CGFloat shortcutBarColumnWidth

Discussion

When the shortcut bar is visible, this property is uesd to determine how much space should be taken to display the shortcut bar.

Declared In

IGGridView.h

shortcutBarPressedColor

Sets UIColor of the shortcut bar while it’s pressed.

@property (nonatomic, retain) UIColor *shortcutBarPressedColor

Discussion

The default is light gray. This is the color of the shortcut bar itself and not the color of the background of the column the shortcut bar is in.

Declared In

IGGridView.h

slideRowLeftWidth

Gets/Sets the width of the view that will be displayed when you swipe a row and the swipRowAction property is set to: IGGridViewSwipeRowActionSlideRowLeft or IGGridViewSwipeRowActionSlideRowBoth

@property (nonatomic, assign) CGFloat slideRowLeftWidth

Declared In

IGGridView.h

slideRowRightWidth

Gets/Sets the width of the view that will be displayed when you swipe a row and the swipRowAction property is set to: IGGridViewSwipeRowActionSlideRowRight or IGGridViewSwipeRowActionSlideRowBoth

@property (nonatomic, assign) CGFloat slideRowRightWidth

Declared In

IGGridView.h

strings

Sets the IGGridViewStringsDefinition that will control the default text values of particular elements of the IGGridView.

@property (nonatomic, weak) id<> strings

Discussion

When setting this property, you should call the grid’s updateData method afterwards to ensure all elements are refreshed..

Declared In

IGGridView.h

style

Returns the style of the receiver. (read-only)

@property (nonatomic, readonly) IGGridViewStyle style

Discussion

Two possible options:

IGGridViewStyleDefault - Used for standard cell row layouts.
IGGridViewStyleSingleCellPaging - A single cell will be sized to the viewport of the grid view. 

Declared In

IGGridView.h

swipeRowAction

Gets/Sets the action that will occur when swiping a row.

@property (nonatomic, assign) IGGridViewSwipeRowAction swipeRowAction

Discussion

The default is IGGridViewSwipeRowActionNone. Note, this will not have an effect if the grid view allows horizontal scrolling.

Declared In

IGGridView.h

theme

Sets the IGGridViewThemeDefinition that will control the styling of particular elements of the IGGridView.

@property (nonatomic, weak) id<> theme

Discussion

When setting this property, you should call the grid’s updateData method afterwards to ensure all of the stylable areas are refreshed.

Declared In

IGGridView.h

transitionDuration

A value that represents time in seconds it will take for rows and cell to be moved, inserted or deleted

@property (nonatomic, assign) CGFloat transitionDuration

Discussion

The default value is .75 seconds.

Declared In

IGGridView.h

Instance Methods

cellAtPath:

Returns a IGGridViewCellBase for the specified path.

- (id)cellAtPath:(IGCellPath *)path

Parameters

path

The IGCellPath of the cell that should be returned.

Return Value

If the specified path is not in view, nil is returned.

Declared In

IGGridView.h

deleteCellsAtPaths:withAnimation:

Deletes cells in the receiver at the location identified by an array of IGCellPath objects, with an option to animate the deletion.

- (void)deleteCellsAtPaths:(NSArray *)paths withAnimation:(IGGridViewAnimation)animation

Parameters

paths

An array of IGCellPath objects each representing a cell in the grid view.

animation

A constant that specifies the kind of animation to perform.

Discussion

UpdateData will automatically be invoked when this method is called. It should not be called before or after this method is invoked.

Declared In

IGGridView.h

deleteColumnsAtIndexes:

Deletes columns in the receiver at the location identified by an array of NSNumber objects.

- (void)deleteColumnsAtIndexes:(NSArray *)indexes

Parameters

indexes

An array of NSNumber objects each representing an index of a column in the grid view.

Discussion

UpdateData will automatically be invoked when this method is called. It should not be called before or after this method is invoked.

Declared In

IGGridView.h

deleteFixedLeftColumnsAtIndexes:

Deletes fixed columns from the left side of the receiver at the location identified by an array of NSNumber objects.

- (void)deleteFixedLeftColumnsAtIndexes:(NSArray *)indexes

Parameters

indexes

An array of NSNumber objects each representing an index of a column in the grid view.

Discussion

UpdateData will automatically be invoked when this method is called. It should not be called before or after this method is invoked.

Declared In

IGGridView.h

deleteFixedRightColumnsAtIndexes:

Deletes fixed columns from the right side of the receiver at the location identified by an array of NSNumber objects.

- (void)deleteFixedRightColumnsAtIndexes:(NSArray *)indexes

Parameters

indexes

An array of NSNumber objects each representing an index of a column in the grid view.

Discussion

UpdateData will automatically be invoked when this method is called. It should not be called before or after this method is invoked.

Declared In

IGGridView.h

deleteRowsAtPaths:withAnimation:

Deletes rows in the receiver at the location identified by an array of IGRowPath objects, with an option to animate the deletion.

- (void)deleteRowsAtPaths:(NSArray *)paths withAnimation:(IGGridViewAnimation)animation

Parameters

paths

An array of IGRowPath objects each representing a row in the grid view.

animation

A constant that specifies the kind of animation to perform.

Discussion

UpdateData will automatically be invoked when this method is called. It should not be called before or after this method is invoked.

Declared In

IGGridView.h

dequeueReusableCellWithIdentifier:

Returns a reusable grid view cell objet located by its identifier

- (id)dequeueReusableCellWithIdentifier:(NSString *)identifier

Parameters

identifier

A string identifying the cell object to be reused. By default, a reusable cell’s identifier is it’s class name, but you can change it to any arbitrary value.

Return Value

A IGGridViewCellBase object with the associated identifier or nil if no such object exists in the reusable-cell queue.

Discussion

For performance reasons, a grid view’s data source should generally reuse IGGridViewCellBase objects when it assigns cells to rows in it’s gridView:cellAt: method. A grid view maintains a queue or list of IGGridViewCellBase objects that the grid view’s delegate has marked for reuse. It marks a cell for reuse by assigning it a reuse identifier when it creates it (that is, in the initWithReuseIdentifier: method of IGGridViewCellBase). The data source can access specific template cell objects in this queue by invoking this method. You can access a cell’s reuse identifier through it’s reuseIdentifier property, which is defined by IGGridViewCellBase.

Declared In

IGGridView.h

deselectAll

Clears all selection

- (void)deselectAll

Declared In

IGGridView.h

deselectCellAtPath:animated:

Deselects the cell at the specified path.

- (void)deselectCellAtPath:(IGCellPath *)path animated:(BOOL)animated

Parameters

path

The IGCellPath of the cell that should be deselected

animated

Whether the cell should be animated into it’s deselected state (YES) or happen immediately(NO).

Discussion

Calling this method does not cause the delegate to receive a gridView:willDeselectCellAtPath: or gridView:didDeselectCellAtPath: message.

Declared In

IGGridView.h

deselectRowAtPath:animated:

Deselects the row at the specified path.

- (void)deselectRowAtPath:(IGRowPath *)path animated:(BOOL)animated

Parameters

path

The IGRowPath of the row that should be deselected

animated

Whether the row should be animated into it’s deselected state (YES) or happen immediately(NO).

Discussion

Calling this method does not cause the delegate to receive a gridView:willDeselectRowAtPath: or gridView:didDeselectRowAtPath: message.

Declared In

IGGridView.h

finishedUpdating

Tells the grid view that it no longer needs to be in the update state, and should update it’s data and go back to normal.

- (void)finishedUpdating

Discussion

This method should be invoked when the pull down row of the grid view is in the upating state. This occurs when the grid view is pulled down beyond it’s bounds and is released. This method will automatically invoke the updateData method.

Declared In

IGGridView.h

initWithFrame:style:

Initializes and returns a grid view object having the given frame and style

- (id)initWithFrame:(CGRect)frame style:(IGGridViewStyle)style

Parameters

frame

A rectangle specifying the initial location and size of the grid view in it’s superview’s coordinates.

style

A constant that specifies the style of the grid view.

Return Value

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

Discussion

You must specify the style of a grid view when you create it and you cannot thereafter modify the style. If you initialize the grid view with another method, the IGGridViewStyleDefault is used.

Declared In

IGGridView.h

insertCellsAtPaths:withAnimation:

Inserts cells in the receiver at the location identified by an array of IGCellPath objects, with an option to animate the insertion.

- (void)insertCellsAtPaths:(NSArray *)paths withAnimation:(IGGridViewAnimation)animation

Parameters

paths

An array of IGCellPath objects each representing a cell in the grid view.

animation

A constant that specifies the kind of animation to perform.

Discussion

UpdateData will automatically be invoked when this method is called. It should not be called before or after this method is invoked.

Declared In

IGGridView.h

insertColumnsAtIndexes:

Inserts columns in the receiver at the location identified by an array of NSNumbers.

- (void)insertColumnsAtIndexes:(NSArray *)indexes

Parameters

indexes

An array of NSNumber objects each representing an index of a column in the grid view.

Discussion

UpdateData will automatically be invoked when this method is called. It should not be called before or after this method is invoked.

Declared In

IGGridView.h

insertFixedLeftColumnsAtIndexes:

Inserts fixed columns to the left side of the receiver at the location identified by an array of NSNumbers.

- (void)insertFixedLeftColumnsAtIndexes:(NSArray *)indexes

Parameters

indexes

An array of NSNumber objects each representing an index of a column in the grid view.

Discussion

UpdateData will automatically be invoked when this method is called. It should not be called before or after this method is invoked.

Declared In

IGGridView.h

insertFixedRightColumnsAtIndexes:

Inserts fixed columns to the right side of the receiver at the location identified by an array of NSNumbers.

- (void)insertFixedRightColumnsAtIndexes:(NSArray *)indexes

Parameters

indexes

An array of NSNumber objects each representing an index of a column in the grid view.

Discussion

UpdateData will automatically be invoked when this method is called. It should not be called before or after this method is invoked.

Declared In

IGGridView.h

insertRowsAtPaths:withAnimation:

Inserts rows in the receiver at the location identified by an array of IGRowPath objects, with an option to animate the insertion.

- (void)insertRowsAtPaths:(NSArray *)paths withAnimation:(IGGridViewAnimation)animation

Parameters

paths

An array of IGRowPath objects each representing a row in the grid view.

animation

A constant that specifies the kind of animation to perform.

Discussion

UpdateData will automatically be invoked when this method is called. It should not be called before or after this method is invoked.

Declared In

IGGridView.h

moveCellAtPath:toPath:

Moves the specified cell in the receiver at the location identified by the new path.

- (void)moveCellAtPath:(IGCellPath *)path toPath:(IGCellPath *)newPath

Parameters

path

An IGCellPath representing the cell that should be moved.

newPath

An IGCellPath representing the new location of the cell.

Discussion

UpdateData will automatically be invoked when this method is called. It should not be called before or after this method is invoked.

Declared In

IGGridView.h

moveColumnAtIndex:toIndex:

Moves the specified column in the receiver at the location identified by the new index.

- (void)moveColumnAtIndex:(int)index toIndex:(int)newIndex

Parameters

index

An index representing the column that should be moved.

newIndex

An index representing the new location of the column.

Discussion

UpdateData will automatically be invoked when this method is called. It should not be called before or after this method is invoked.

Declared In

IGGridView.h

moveRowAtPath:toPath:

Moves the specified row in the receiver at the location identified by the new path.

- (void)moveRowAtPath:(IGRowPath *)path toPath:(IGRowPath *)newPath

Parameters

path

An IGRowPath representing the row that hould be moved.

newPath

An IGRowPath representing the new location of the row.

Discussion

UpdateData will automatically be invoked when this method is called. It should not be called before or after this method is invoked.

Declared In

IGGridView.h

pathForCell:

Returns the IGCellPath of the specified cell.

- (IGCellPath *)pathForCell:(IGGridViewCellBase *)cell

Parameters

cell

A IGGridViewCellBase object.

Declared In

IGGridView.h

pathForCellAtPoint:

Returns a IGCellPath at the specified point in the grid view.

- (IGCellPath *)pathForCellAtPoint:(CGPoint)point

Parameters

point

A valid CGPoint within the content area of the grid view.

Return Value

A IGCellPath or nil if the point does not correspond with a cell.

Declared In

IGGridView.h

pathForRowAtPoint:

Returns a IGRowPath at the specified point in the grid view.

- (IGRowPath *)pathForRowAtPoint:(CGPoint)point

Parameters

point

A valid CGPoint within the content area of the grid view.

Return Value

A IGRowPath or nil if the point does not correspond with a row.

Declared In

IGGridView.h

pathForSelectedCell

The IGCellPath of the currently selected cell or nil.

- (IGCellPath *)pathForSelectedCell

Discussion

If no cell is selected nil is returned. If more than one cell is selected, the top most selected cell in the grid view is returned.

Declared In

IGGridView.h

pathForSelectedRow

The IGRowPath of the currently selected row or nil.

- (IGRowPath *)pathForSelectedRow

Discussion

If no row is selected nil is returned. If more than one row is selected, the top most selected row in the grid view is returned.

Declared In

IGGridView.h

pathsForCellsInRect:

An array of cell paths each representing a cell enclosed by a given rectangle.

- (NSArray *)pathsForCellsInRect:(CGRect)frame

Parameters

frame

A rectangle defining an area of the grid view in local coordinates.

Return Value

An array of IGCellPath objects within the bounds of the frame or an empty array if no cells fall within the frame

Declared In

IGGridView.h

pathsForSelectedCells

An array of selected IGCellPath objects.

- (NSArray *)pathsForSelectedCells

Discussion

If no cell is selected an empty array is returned.

Declared In

IGGridView.h

pathsForSelectedRows

An array of selected IGRowPath objects.

- (NSArray *)pathsForSelectedRows

Discussion

If no row is selected an empty array is returned.

Declared In

IGGridView.h

pathsForVisibleRows

Returns the IGRowPath objects that are currently within the visible viewport of the grid view.

- (NSArray *)pathsForVisibleRows

Declared In

IGGridView.h

registerClass:forCellReuseIdentifier:

Registers a class for use in creating new grid cells.

- (void)registerClass:(Class)cellClass forCellReuseIdentifier:(NSString *)identifier

Parameters

cellClass

The class of a cell that you want to use in the grid.

identifier

The reuse identifier for the cell. This parameter must not be nil and must not be an empty string.

Discussion

Prior to dequeueing any cells, call this method to tell the grid view how to create new cells. If a cell of the specified type is not currently in a reuse queue, the grid view uses the provided information to create a new cell object automatically.

If you previously registered a class file with the same reuse identifier, the class you specify in the cellClass parameter replaces the old entry. You may specify nil for cellClass if you want to unregister the class from the specified reuse identifier.

Declared In

IGGridView.h

reloadData

Reloads the rows and sections of the receiever.

- (void)reloadData

Discussion

Calling this method invokes all methods from the datasource and delegate used to build content area of the grid view. All state is lost including selection and scroll position. If you would like to reload the data but do not want to lose state, use the updateData method.

Declared In

IGGridView.h

scrollToCellAtCellPath:atScrollPosition:animated:

Scrolls a cell to the specified position in the viewable area of the grid view.

- (void)scrollToCellAtCellPath:(IGCellPath *)path atScrollPosition:(IGGridViewScrollPosition)position animated:(BOOL)animate

Parameters

path

The IGCellPath of the cell that should be scrolled into view.

position

The position in which the cell should be scrolled to in the grid view.

animate

Whether the cell should be animated into position(YES) or if it should just appear into the correct position immediately(NO)

Discussion

The following positions can be used for scrolling the row into view:

IGGridViewScrollPositionNone, IGGridViewScrollPositionNoneLeft, IGGridViewScrollPositionNoneRight, IGGridViewScrollPositionNoneMiddle, IGGridViewScrollPositionTopLeft, IGGridViewScrollPositionTopMiddle, IGGridViewScrollPositionTopRight, IGGridViewScrollPositionTopNone, IGGridViewScrollPositionMiddleLeft, IGGridViewScrollPositionMiddle, IGGridViewScrollPositionMiddleRight, IGGridViewScrollPositionMiddleNone, IGGridViewScrollPositionBottomLeft, IGGridViewScrollPositionBottomMiddle, IGGridViewScrollPositionBottomRight, IGGridViewScrollPositionBottomNone

IGGridViewScrollPositionNone: The grid view scrolls the cell of interest to be fully visible with a minimum of movement. If the cell is already fully visible, no scrolling occurs.

Declared In

IGGridView.h

selectCellAtPath:animated:scrollPosition:

Selects the cell at the specified path and optionally scrolls that cell into view.

- (void)selectCellAtPath:(IGCellPath *)path animated:(BOOL)animated scrollPosition:(IGGridViewScrollPosition)scrollPosition

Parameters

path

The IGCellPath of the cell that should be selected

animated

Whether the cell should be animated into it’s selected state and any movement in position (YES) or happen immediately(NO).

scrollPosition

The position in which the selected cell should be scrolled to in the grid view.

Discussion

Calling this method does not cause the delegate to receive a gridView:willSelectCellAtPath: or gridView:didSelectCellAtPath: message.

The following positions can be used for scrolling the cell into view:

    IGGridViewScrollPositionNone,
    IGGridViewScrollPositionNoneLeft,
    IGGridViewScrollPositionNoneRight,
    IGGridViewScrollPositionNoneMiddle,
    IGGridViewScrollPositionTopLeft,
    IGGridViewScrollPositionTopMiddle,
    IGGridViewScrollPositionTopRight,
    IGGridViewScrollPositionTopNone,
    IGGridViewScrollPositionMiddleLeft,
    IGGridViewScrollPositionMiddle,
    IGGridViewScrollPositionMiddleRight,
    IGGridViewScrollPositionMiddleNone,
    IGGridViewScrollPositionBottomLeft, 
    IGGridViewScrollPositionBottomMiddle,
    IGGridViewScrollPositionBottomRight,
    IGGridViewScrollPositionBottomNone

Passing IGGridViewScrollPositionNone will result in no scrolling, rather than the minimum scrolling described for that constant. To scroll to the newly selected cell with minimum scrolling, select the cell using this method with IGGridViewScrollPositionNone, then call scrollToCellAtCellPath:atScrollPosition:animated: with IGGridViewScrollPositionNone.

Declared In

IGGridView.h

selectRowAtPath:animated:scrollPosition:

Selects the row at the specified path and optionally scrolls that row into view.

- (void)selectRowAtPath:(IGRowPath *)path animated:(BOOL)animated scrollPosition:(IGGridViewScrollPosition)scrollPosition

Parameters

path

The IGRowPath of the row that should be selected

animated

Whether the row should be animated into it’s selected state(YES) and any movement in position or happen immediately(NO).

scrollPosition

The position in which the selected row should be scrolled to in the grid view.

Discussion

Calling this method does not cause the delegate to receive a gridView:willSelectRowAtPath: or gridView:didSelectRowAtPath: message.

The following positions can be used for scrolling the row into view:

    IGGridViewScrollPositionNone,
    IGGridViewScrollPositionNoneLeft,
    IGGridViewScrollPositionNoneRight,
    IGGridViewScrollPositionNoneMiddle,
    IGGridViewScrollPositionTopLeft,
    IGGridViewScrollPositionTopMiddle,
    IGGridViewScrollPositionTopRight,
    IGGridViewScrollPositionTopNone,
    IGGridViewScrollPositionMiddleLeft,
    IGGridViewScrollPositionMiddle,
    IGGridViewScrollPositionMiddleRight,
    IGGridViewScrollPositionMiddleNone,
    IGGridViewScrollPositionBottomLeft, 
    IGGridViewScrollPositionBottomMiddle,
    IGGridViewScrollPositionBottomRight,
    IGGridViewScrollPositionBottomNone

Passing IGGridViewScrollPositionNone will result in no scrolling, rather than the minimum scrolling described for that constant. To scroll to the newly selected row with minimum scrolling, select the row using this method with IGGridViewScrollPositionNone, then call scrollToCellAtCellPath:atScrollPosition:animated: with IGGridViewScrollPositionNone.

Declared In

IGGridView.h

setRowReordering:animated:

A Boolean value that determines if the row reordering indicator is visible in the grid view.

- (void)setRowReordering:(BOOL)rowReordering animated:(BOOL)animated

Parameters

rowReordering

Yes if the row reordering indicator should be visible.

animated

The row reordering indicator should animated in or out of view.

Discussion

The dataSource must implement the following methods in order for this property to be set to YES. canReorderRows:gridView; – must return YES gridView:canMoveRowAtPath: – if returns now, no indicator will appear for that row. gridView:moveRowAtPath:toPath:

Declared In

IGGridView.h

updateData

Reloads the rows and sections of the receiever.

- (void)updateData

Discussion

Calling this method invokes all methods from the datasource and delegate used to build content area of the grid view. All state is kept, including selection and scroll position. If data is deleted, inserted, or reordered, the following methods should be used instead:

    moveCellAtPath:toPath:
    insertCellsAtPaths:withAnimation:animation 
    deleteCellsAtPaths:withAnimation:animation
    moveRowAtPath:toPath:
    insertRowsAtPaths:withAnimation:animation 
    deleteRowssAtPaths:withAnimation:animation

Declared In

IGGridView.h

visibleCells

Returns the IGGridViewCell objects that are currently within the visible viewport of the grid view.

- (NSArray *)visibleCells

Declared In

IGGridView.h