Inherits from UICollectionViewCell
Declared in SCDefaultLevelUpGridCell.h
SCDefaultLevelUpGridCell.m

Overview

A UICollectionViewCell sub-class for rendering text that represents a “level up” marker.

It creates a UILabel sized as the entire cell. It uses default font and color settings.
There is no way to configure its look and feel except of using UIAppearance API.

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

Properties

backgroundColorForHighlightedState

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

@property (nonatomic, strong) UIColor *backgroundColorForHighlightedState

Declared In

SCDefaultLevelUpGridCell.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

SCDefaultLevelUpGridCell.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

SCDefaultLevelUpGridCell.h

setLevelUpText:

Sets the “level up” text message.

- (void)setLevelUpText:(NSString *)levelUp

Parameters

levelUp

localized text to display within the label. It will be displayed as is.

Declared In

SCDefaultLevelUpGridCell.h