Inherits from SDataGridMultiLineTextCell : SDataGridTextInputCell : SDataGridCell : UIView
Declared in SDataGridHeaderMultiLineCell.h
Availability
Related samples

Overview

This cell type is used in a ShinobiDataGrid in order to populate the header row. Each column has a header cell that can be retrieved with the headerCell method on an SDataGridHeaderColumn object.

This cell type cannot respond to edit events or double tap events by default. It is possible to change this behaviour via subclassing - see the Methods for Subclassing.

The implementation of coordinate in this class returns nil.

Tasks

Other Methods

  • – applyStyle:

    This method is called in order to style each cell as the grid is preparing to display.

Methods for Subclassing.

Properties

spaceBetweenArrowAndText

The space to be used between the sort arrow and text.

@property (nonatomic, assign, readonly) CGFloat spaceBetweenArrowAndText

Declared In

SDataGridHeaderMultiLineCell.h

Instance Methods

applyStyle:

This method is called in order to style each cell as the grid is preparing to display.

- (void)applyStyle:(SDataGridCellStyle *)style

Discussion

If you create your own cell subclass you may want to override this method to ensure that the style object is properly used in the styling of the cell. For example the SGridAutoCell implementation ensures that text alignment is properly applied to the cell

Declared In

SDataGridCell.h

respondsToDoubleTap

Dictates whether the cell responds to double taps.

- (BOOL)respondsToDoubleTap

Discussion

The default value for this is NO.

Declared In

SDataGridHeaderMultiLineCell.h

showArrowForSortOrder:sortMode:

Show and position the arrow for a given sort order.

- (void)showArrowForSortOrder:(SDataGridColumnSortOrder)sortOrder sortMode:(SDataGridColumnSortMode)sortMode

Parameters

sortOrder

The sort order for which to display the arrow.

sortMode

The sort mode the column is currently in.

Discussion

An implementation of this method would typically want to handle the adding/removing of the arrow, positioning of the arrow, as well as the use of different arrows for the specified sort orders.

 -(void)showArrowForSortOrder:(SDataGridColumnSortOrder)sortOrder sortMode:(SDataGridColumnSortMode)mode {
     // Remove old arrow.
     [_arrowView removeFromSuperview];

     // Load in custom arrow image.
     UIImage *arrow = [self customArrowForSortOrder:sortOrder];
     _arrowView = [[UIImageView alloc] initWithImage:arrow];

     // Position and add arrow.
     [self addSubview:_arrowView];
     _arrowView.frame = CGRectMake(0, 0, 50, 50);
 }

Declared In

SDataGridHeaderMultiLineCell.h