SIBGridModeCellFactory Protocol Reference
Conforms to | NSObject |
Declared in | SIBGridModeCellFactory.h |
Overview
You must implement this protocol in order to provide cells for the SCItemGridBrowser controller. Typically, the cells should be inherited from the SCItemGridCell class.
The method implementation should either construct a brand new cell object or follow the instructions below :
- Register a class or a nib file for the given item
- Obtain an item using the [UICollectionView dequeueReusableCellWithReuseIdentifier:forIndexPath:] method of the UICollectionView.
Tasks
-
– itemsBrowser:createLevelUpCellAtIndexPath:
Provides a new cell for the level up item
required method -
– itemsBrowser:createGridModeCellForItem:atIndexPath:
Provides a new cell for the given item.
required method
Instance Methods
itemsBrowser:createGridModeCellForItem:atIndexPath:
Provides a new cell for the given item.
- (UICollectionViewCell<SCItemCell> *)itemsBrowser:(SCItemGridBrowser *)sender createGridModeCellForItem:(SCItem *)item atIndexPath:(NSIndexPath *)indexPath
Parameters
- sender
SCItemGridBrowser controller instance.
- item
An item to be rendered in the given cell.
- indexPath
NSIndexPath from the UICollectionViewDataSource. It should be passed to [UICollectionView dequeueReusableCellWithReuseIdentifier:forIndexPath:]
Return Value
A new cell.
Do not invoke methods of the SCItemCell protocol directly. SCItemGridBrowser controller will do it for you.
Declared In
SIBGridModeCellFactory.h
itemsBrowser:createLevelUpCellAtIndexPath:
Provides a new cell for the level up item
- (UICollectionViewCell *)itemsBrowser:(SCItemGridBrowser *)sender createLevelUpCellAtIndexPath:(NSIndexPath *)indexPath
Parameters
- sender
SCItemGridBrowser controller instance.
- indexPath
NSIndexPath from the UICollectionViewDataSource. It should be passed to [UICollectionView dequeueReusableCellWithReuseIdentifier:forIndexPath:]
Return Value
A new cell.
Declared In
SIBGridModeCellFactory.h