RBLazyLayoutView Class Reference

Inherits from RBBaseLayoutView : RBScrollView : UIScrollView
Declared in RBLazyLayoutView.h

Overview

The lazy loading layout view.

  delegate

A delegate that receives cell loading, appearance and positioning events.

@property (nonatomic, weak, nullable) id<RBLazyLayoutViewDelegate,RBBaseLayoutViewDelegate> delegate

Discussion

A delegate that receives cell loading, appearance and positioning events.

Declared In

RBLazyLayoutView.h

  dataSource

The data source that provides cells to the layout view.

@property (nonatomic, weak, nullable) id<RBLazyLayoutViewDataSource> dataSource

Discussion

The data source that provides cells to the layout view.

Declared In

RBLazyLayoutView.h

– reloadData

Reloads the cells from the data source.

- (void)reloadData

Discussion

Reloads the cells from the data source.

Declared In

RBLazyLayoutView.h

– reusableCellWithType:configurationOnCreation:

Gets an instantiated or reused cell of the given type. The layout view is capable of managing multiple types. The returned cell will have theming applied on creation.

- (nonnull __kindof UIView *)reusableCellWithType:(nonnull Class)cellType configurationOnCreation:(nullable void ( ^ ) ( __kindof UIView *__nonnull cell ))configurationOnCreation

Parameters

cellType

The type of the cell to reuse or instantiate.

configurationOnCreation

An optional block to be called only on instantiation (not on reuse).

Return Value

The cell object for configuration.

Discussion

Gets an instantiated or reused cell of the given type. The layout view is capable of managing multiple types. The returned cell will have theming applied on creation.

Declared In

RBLazyLayoutView.h

– reusableCellWithType:shouldApplyTheming:configurationOnCreation:

Gets an instantiated or reused cell of the given type. The layout view is capable of managing multiple types.

- (nonnull __kindof UIView *)reusableCellWithType:(nonnull Class)cellType shouldApplyTheming:(BOOL)applyTheming configurationOnCreation:(nullable void ( ^ ) ( __kindof UIView *__nonnull cell ))configurationOnCreation

Parameters

cellType

The type of the cell to reuse or instantiate.

applyTheming

Whether or not to apply theming to the cell immediately on creation.

configurationOnCreation

An optional block to be called only on instantiation (not on reuse).

Return Value

The cell object for configuration.

Discussion

Gets an instantiated or reused cell of the given type. The layout view is capable of managing multiple types.

Declared In

RBLazyLayoutView.h

– cellWillLoad:atIndex:

Called when the cell at the given index will be loaded.

- (void)cellWillLoad:(nonnull __kindof UIView *)cell atIndex:(NSUInteger)index

Parameters

cell

The cell that will be loaded.

index

The index of the cell in the layout.

Discussion

Called when the cell at the given index will be loaded.

Declared In

RBLazyLayoutView.h

– cellDidLoad:atIndex:

Called when the cell at the given index was loaded.

- (void)cellDidLoad:(nonnull __kindof UIView *)cell atIndex:(NSUInteger)index

Parameters

cell

The cell that was loaded.

index

The index of the cell in the layout.

Discussion

Called when the cell at the given index was loaded.

Declared In

RBLazyLayoutView.h

– cellWillUnload:atIndex:

Called when the cell at the given index will be unloaded.

- (void)cellWillUnload:(nonnull __kindof UIView *)cell atIndex:(NSUInteger)index

Parameters

cell

The cell that will be unloaded.

index

The index of the cell in the layout.

Discussion

Called when the cell at the given index will be unloaded.

Declared In

RBLazyLayoutView.h

– cellDidUnload:atIndex:

Called when the cell at the given index was unloaded.

- (void)cellDidUnload:(nonnull __kindof UIView *)cell atIndex:(NSUInteger)index

Parameters

cell

The cell that was unloaded.

index

The index of the cell in the layout.

Discussion

Called when the cell at the given index was unloaded.

Declared In

RBLazyLayoutView.h

– willReloadData

Called when the layout view will reload it’s cells from the data source.

- (void)willReloadData

Discussion

Called when the layout view will reload it’s cells from the data source.

Declared In

RBLazyLayoutView.h

– didReloadData

Called when the layout view has reloaded it’s cells from the data source.

- (void)didReloadData

Discussion

Called when the layout view has reloaded it’s cells from the data source.

Declared In

RBLazyLayoutView.h