Inherits from NSObject
Declared in SDataGridTheme.h
Availability
Related samples

Overview

A data-grid theme can set the initial styling properties of a data-grid for you to further customize if you wish. The data-grid comes with four preset themes and any data-grid that is rendered will ask the theme for the current set of colors and styles.

The four themes are:

  • iOS - Fits in nicely with the Apple styled UIKit controls
  • iOS 7 - Fits in nicely with the ‘flat’ Apple styled iOS 7 UIKit controls
  • Light - Lighter and more neutral colors with subtle highlighting
  • Dark - Darker colors with bright highlighting

The default theme is iOS theme for iOS 6 and older devices, and iOS 7 for iOS 7 and newer. To change the theme that a data-grid is using, you can use the [ShinobiDataGrid applyTheme:] method. You can create particular themes by using the SDataGridTheme subclasses, SDataGridiOSTheme, SDataGridiOS7Theme, SDataGridLightTheme and SDataGridDarkTheme.

[myGrid applyTheme:[SDataGridDarkTheme new]];

Tasks

Changing themes

  • + setInitialTheme:

    Sets the theme styling that all new data-grids will be created with.

  • + initialTheme

    Get the theme styling that all new data-grids will be created with.

Current initial-theme colors

Current initial-theme styles

Properties

alternateRowStyle

The default style applied to rows when this theme is set initially

@property (nonatomic, retain) SDataGridCellStyle *alternateRowStyle

Discussion

Note: this is the alternate row styling, see also rowStyle

Declared In

SDataGridTheme.h

gridLineStyle

The default style applied to grid lines

@property (nonatomic, retain) SDataGridLineStyle *gridLineStyle

Declared In

SDataGridTheme.h

headerRowStyle

The default style applied to cells in the header row

@property (nonatomic, retain) SDataGridCellStyle *headerRowStyle

Declared In

SDataGridTheme.h

hideVerticalGridlines

A BOOL controlling whether vertical grid lines are hidden in this theme.

@property (nonatomic, assign) BOOL hideVerticalGridlines

Declared In

SDataGridTheme.h

iOS7Arrows

A BOOL controlling whether iOS 7 arrows are used in this theme.

@property (nonatomic, assign) BOOL iOS7Arrows

Declared In

SDataGridTheme.h

rowStyle

The default style applied to rows when this theme is set initially

@property (nonatomic, retain) SDataGridCellStyle *rowStyle

Discussion

Note: alternate row styling may be configured see alternateRowStyle

Declared In

SDataGridTheme.h

sectionHeaderStyle

The default style applied to the section header

@property (nonatomic, retain) SDataGridSectionHeaderStyle *sectionHeaderStyle

Declared In

SDataGridTheme.h

selectedCellStyle

The default style applied to selected cells when this theme is set initially

@property (nonatomic, retain) SDataGridCellStyle *selectedCellStyle

Declared In

SDataGridTheme.h

tintColor

A UIColor representing the tint color while the grid is reordering, in this theme.

@property (nonatomic, assign) UIColor *tintColor

Declared In

SDataGridTheme.h

Class Methods

defaultAlternateRowStyle

The default style applied to rows when this theme is set initially

+ (SDataGridCellStyle *)defaultAlternateRowStyle

Discussion

Note: this is the alternate row styling, see also defaultRowStyle

Declared In

SDataGridTheme.h

defaultAlternatingRowStyle

The default style applied to rows when this theme is set initially

+ (SDataGridCellStyle *)defaultAlternatingRowStyle

Discussion

Note: this is the alternate row styling, see also defaultRowStyle

Warning: Important: This property has been deprecated in preference of defaultAlternateRowStyle.

Declared In

SDataGridTheme.h

defaultGridLineStyle

The default style applied to grid lines

+ (SDataGridLineStyle *)defaultGridLineStyle

Declared In

SDataGridTheme.h

defaultHeaderRowStyle

The default style applied to cells in the header row

+ (SDataGridCellStyle *)defaultHeaderRowStyle

Declared In

SDataGridTheme.h

defaultRowStyle

The default style applied to rows when this theme is set initially

+ (SDataGridCellStyle *)defaultRowStyle

Discussion

Note: alternate row styling may be configured see defaultAlternateRowStyle

Declared In

SDataGridTheme.h

defaultSectionHeaderStyle

The default style applied to the section header

+ (SDataGridSectionHeaderStyle *)defaultSectionHeaderStyle

Declared In

SDataGridTheme.h

defaultSelectedCellStyle

The default style applied to selected cells when this theme is set initially

+ (SDataGridCellStyle *)defaultSelectedCellStyle

Declared In

SDataGridTheme.h

initialTheme

Get the theme styling that all new data-grids will be created with.

+ (SDataGridInitialTheme)initialTheme

Declared In

SDataGridTheme.h

initialThemeCellBackgroundColor

A UIColor representing the background color set for cells in this theme.

+ (UIColor *)initialThemeCellBackgroundColor

Discussion

Note: alternate row styling may be configured see initialThemeCellBackgroundColorAlternate

Declared In

SDataGridTheme.h

initialThemeCellBackgroundColorAlternate

A UIColor representing the background color set for cells in this theme.

+ (UIColor *)initialThemeCellBackgroundColorAlternate

Discussion

Note: this is the alternate color, see also initialThemeCellBackgroundColor

Declared In

SDataGridTheme.h

initialThemeCellSelectionColor

A UIColor representing the background color set for selected cells in this theme.

+ (UIColor *)initialThemeCellSelectionColor

Declared In

SDataGridTheme.h

initialThemeHeaderCellColor

A UIColor representing the background color set for header cells in this theme.

+ (UIColor *)initialThemeHeaderCellColor

Discussion

Note: header cells are defined per SDataGridColumn

Declared In

SDataGridTheme.h

initialThemeSectionHeaderBackgroundColor

A UIColor representing the fill color set for section headers in this theme.

+ (UIColor *)initialThemeSectionHeaderBackgroundColor

Declared In

SDataGridTheme.h

initialThemeSectionHeaderFontColor

A UIColor representing the font color set for section headers in this theme.

+ (UIColor *)initialThemeSectionHeaderFontColor

Declared In

SDataGridTheme.h

setInitialTheme:

Sets the theme styling that all new data-grids will be created with.

+ (void)setInitialTheme:(SDataGridInitialTheme)initial

Discussion

Only applies to data-grids that are created after this is set.

typedef enum { SDataGridInitialThemeiOS, SDataGridInitialThemeLight, SDataGridInitialThemeDark, } SDataGridInitialTheme;

Using [ShinobiDataGrid applyTheme:] is now preferred over this static method

Declared In

SDataGridTheme.h