Inherits from SCAbstractItemsBrowser : NSObject
Conforms to SCAbstractItemsBrowserSubclassing
UICollectionViewDataSource
UICollectionViewDelegate
Declared in SCItemGridBrowser.h
SCItemGridBrowser.mm

Overview

The SCItemGridBrowser class is responsible for displaying items hierarchy in the UICollectionView object provided by the user. It is a controller in terms of the MVC pattern. The items hierarchy is read-only so the user cannot edit content using this control.

Once initialized, it should be possible to

  • reloadData
  • forceRefreshData
  • navigateToRootItem

The controller takes the control over both UICollectionViewDelegate and UICollectionViewDataSource events. The user should not set them directly. Still, the user can set any layout of his choice.

SCItemGridBrowser does not support some UICollectionView features.

  • Cell menus
  • Multiple cells selection
  • Cells editing
  • Animated insertion or deletion
  • Supplementary views

It is not possible to modify its properties once initialized. If you need to change the root item or api session, a new controller must be created.

Tasks

Other Methods

  •   collectionView

    A table view to display items. The SCItemGridBrowser controller will become both a delegate and a datasource for it. It can be set from the Interface Builder.

    property
  •   gridModeTheme

    A theme class that responds to UITableViewDelegate methods.
    It can be set from the Interface Builder.

    property
  •   gridModeCellBuilder

    A factory that provides cells for various items. The user is responsible for registering cell classes and nib files using the methods below :

    property

Other Methods

  • – reloadContentView

    This method is triggered by the SCAbstractItemsBrowser each time contents of a given level are successfully loaded. Your implementation must call reloadData method of the content view you are using.

Properties

collectionView

A table view to display items. The SCItemGridBrowser controller will become both a delegate and a datasource for it. It can be set from the Interface Builder.

@property (nonatomic, weak) IBOutlet UICollectionView *collectionView

Declared In

SCItemGridBrowser.h

gridModeCellBuilder

A factory that provides cells for various items. The user is responsible for registering cell classes and nib files using the methods below :

@property (nonatomic, weak) IBOutlet id<SIBGridModeCellFactory> gridModeCellBuilder

Discussion

  • [UICollectionView registerClass:forCellWithReuseIdentifier:]
  • [UICollectionView registerNib:forCellWithReuseIdentifier:]

The user is also responsible for calling the [UICollectionView dequeueReusableCellWithReuseIdentifier:forIndexPath:] to obtain the cell object. This approach ensures the best possible flexibility since items with different templates may have completely different cells.

It can be set from the Interface Builder.

Declared In

SCItemGridBrowser.h

gridModeTheme

A theme class that responds to UITableViewDelegate methods.
It can be set from the Interface Builder.

@property (nonatomic, weak) IBOutlet id<SIBGridModeAppearance> gridModeTheme

Declared In

SCItemGridBrowser.h

Instance Methods

reloadContentView

This method is triggered by the SCAbstractItemsBrowser each time contents of a given level are successfully loaded. Your implementation must call reloadData method of the content view you are using.

- (void)reloadContentView

Discussion

Note : content view should be reloaded both on level down and level up events.

Declared In

SCAbstractItemsBrowserSubclassing.h