Inherits from UICollectionViewCell
Conforms to SCItemCell
Declared in SCItemGridCell.h
SCItemGridCell.m

Overview

A UICollectionViewCell cell that is capable of rendering item’s content.
For custom behaviour you should subclass it and override methods below :

  • setModel:
  • reloadData

For default behaviours please consider sub-classes from the list below :

  • SCItemGridTextCell
  • SCMediaItemGridCell

We have added some background color animations to this sub-class to make the demo application UI look more responsive. If you need some advanced effects, please override the [UICollectionViewCell setHighlighted:] method in your sub-classes.

Tasks

Other Methods

Other Methods

  • – setModel:

    Override this method to get information required for rendering out of the item. Please avoid storing the item itself if possible.

  • – reloadData

    Override this method to get the missing data from the instance and render your cell UI using it.

Properties

backgroundColorForHighlightedState

Background color that is applied when the cell is being touched by the user.

@property (nonatomic, strong) UIColor *backgroundColorForHighlightedState

Declared In

SCItemGridCell.h

backgroundColorForNormalState

Background color that is applied when the cell is displayed in UICollectionView without any user’s interaction.

@property (nonatomic, strong) UIColor *backgroundColorForNormalState

Declared In

SCItemGridCell.h

Instance Methods

reloadData

Override this method to get the missing data from the instance and render your cell UI using it.

- (void)reloadData

Declared In

SCItemCell.h

setModel:

Override this method to get information required for rendering out of the item. Please avoid storing the item itself if possible.

- (void)setModel:(SCItem *)item

Parameters

item

A sitecore item to render

Declared In

SCItemCell.h