Inherits from SCItemGridCell : UICollectionViewCell
Declared in SCMediaItemGridCell.h
SCMediaItemGridCell.m

Overview

A UICollectionViewCell sub-class that displays the image of a given media item.
It creates a UILabel sized as the entire cell.

Tasks

  • – initWithFrame:

    A designated initializer. Used by [UICollectionView dequeueReusableCellWithReuseIdentifier:forIndexPath:] to initialize the cell.

  •   imageResizingOptions

    Options for image resizing. It will be performed on the server side.
    They can be assigned in the cell multiple times since cells are likely to be reused.

    property
  • – setModel:

    Stores the media item in the cell object to populate its image.

  • – reloadData

    Downloads the corresponding image and renders it in the cell.

Properties

imageResizingOptions

Options for image resizing. It will be performed on the server side.
They can be assigned in the cell multiple times since cells are likely to be reused.

@property (nonatomic, strong, readwrite) SCDownloadMediaOptions *imageResizingOptions

Declared In

SCMediaItemGridCell.h

Instance Methods

initWithFrame:

A designated initializer. Used by [UICollectionView dequeueReusableCellWithReuseIdentifier:forIndexPath:] to initialize the cell.

- (instancetype)initWithFrame:(CGRect)frame

Parameters

frame

A frame to initialize cell view. See [UIView initWithFrame:] for details.

Return Value

A properly initialized cell.

Declared In

SCMediaItemGridCell.h

reloadData

Downloads the corresponding image and renders it in the cell.

- (void)reloadData

Declared In

SCMediaItemGridCell.h

setModel:

Stores the media item in the cell object to populate its image.

- (void)setModel:(SCItem *)item

Parameters

item

A sitecore item to render

Declared In

SCMediaItemGridCell.h