SCDefaultLevelUpGridCell Class Reference
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
-
– initWithFrame:
A designated initializer. Used by [UICollectionView dequeueReusableCellWithReuseIdentifier:forIndexPath:] to initialize the cell.
-
– setLevelUpText:
Sets the “level up” text message.
-
backgroundColorForNormalState
Background color that is applied when the cell is displayed in UICollectionView without any user’s interaction.
property -
backgroundColorForHighlightedState
Background color that is applied when the cell is being touched by the user.
property
Properties
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