Index

RBLazyLayoutView.swift

Protocols

Classes


RBLazyLayoutView

The lazy loading layout view.

Properties

A delegate that receives cell loading, appearance and positioning events.
public var layoutDelegate RBLazyLayoutViewDelegate? { get set }

The positioner that determines how the cells are positioned and sized. Default = RBGridPositioner.
public var positioner RBPositioner { get set }

The data source that provides cells to the layout view.
public weak var dataSource RBLazyLayoutViewDataSource? { get set }

Whether or not the cell allows selection. Default = trie.
public var allowsSelection Bool { get set }

Whether or not the cell allows selection. Default = false.
public var allowsMultipleSelection Bool { get set }

Whether or not the last selected item can be unselected. Default = true.
public var zeroSelectionAllowed Bool { get set }

The count of the currently selected cells.
public var selectedCellCount Int { get }

The indexes of the currently selected cells.
public var selectedCellIndexes [Int] { get }

The animator that is used when sliding the body view to reveal the button area. Default = [RBAnimator defaultSpringAnimator].
public var buttonAreaAnimator RBAnimator { get }

The animator that is used when transitioning between states (none, highlighted, selected, disabled). Default = [RBAnimator defaultSpringAnimator] (with duration 0.1).
public var transitionAnimator RBAnimator { get }

public var contentInset UIEdgeInsets { get set }

public var shouldDisableScrolling Bool { get }

public var supportsSchemaBasedPositioners Bool { get }

Functions

Indicates if the cell at the given index is currently selected.
@param index : The index of the cell.
@returns Whether or not the cell is selected.
public func isCellSelected(at index: Int) -> Bool

Indicates if the cell at the given index is currently highlighted. Note this returns ONLY for cells highlighted using setCellHighlightedAt: method.
@param index : The index of the cell.
@returns Whether or not the cell is highlighted.
public func isCellHighlighted(at index: Int) -> Bool

Indicates if the cell at the given index is currently enabled.
@param index : The index of the cell.
@returns Whether or not the cell is enabled.
public func isCellEnabled(at index: Int) -> Bool

Sets the enabled state of the cell at the given index. Ignores the allowsSelection, allowsMultipleSelection, zeroSelectionAllowed values. Events willEnable, didEnable etc are NOT raised when using this method.
@param enabled : The enabled state to set.
@param index : The index of the cell.
@param animated : Animate the state change.
@returns Whether or not the state requested has been set.
public func setCellEnabled(_ enabled: Bool, at index: Int, animated: Bool) -> Bool

Sets the selected state of the cell at the given index. Ignores the allowsSelection, allowsMultipleSelection, zeroSelectionAllowed values. Events willSelect, didSelect etc are NOT raised when using this method.
@param selected : The selected state to set.
@param index : The index of the cell.
@param animated : Animate the state change.
@returns Whether or not the state requested has been set.
public func setCellSelected(_ selected: Bool, at index: Int, animated: Bool) -> Bool

Sets the highlighted state of the cell at the given index. Ignores the allowsSelection, allowsMultipleSelection, zeroSelectionAllowed values. Events shouldHighlight, didHighlight etc are NOT raised when using this method.
@param highlighted : The highlighted state to set.
@param index : The index of the cell.
@param animated : Animate the state change.
@returns Whether or not the state requested has been set.
public func setCellHighlighted(_ highlighted: Bool, at index: Int, animated: Bool) -> Bool

Clears all the currently highlighted cells. Note this applies ONLY for cells highlighted using setCellHighlightedAt: method.
@param animated : Animate the state change.
public func clearAllHighlightedCells(_ animated: Bool)

Clears all the currently selected cells.
@param animated : Animate the state change.
public func clearAllSelectedCells(_ animated: Bool)

Clears all the currently disabled cells.
@param animated : Animate the state change.
public func clearAllDisabledCells(_ animated: Bool)

Slide the body view to reveal the left button area to the user.
@param index : The index of the cell on which to open the button area.
@param animated : Whether or not the transition should be animated.
public func openLeftButtonArea(at index: Int, withAnimation animated: Bool)

Slide the body view to reveal the right button area to the user.
@param index : The index of the cell on which to open the button area.
@param animated : Whether or not the transition should be animated.
public func openRightButtonArea(at index: Int, withAnimation animated: Bool)

Close the exposed button area cell.
@param animated : Whether or not the transition should be animated.
public func closeButtonArea(withAnimation animated: Bool)

The cell view at the given index if it is visible.
@param index : The index of the cell.
@returns The cell view or nil if a cell with the requested index is out of range or is not visible.
public func cell(at index: Int) -> RBBaseCellView?

The index of the given cell view. For cells that are not 'on screen' this will return nil.
@param cell : The index of the cell.
@returns The index of the cell or NSNotFound if the cell is not visible or otherwise unavailable.
public func index(forCell cell: RBBaseCellView) -> Int

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.
@param type : The type of the cell to reuse or instantiate.
@param configurationOnCreation : An optional block to be called only on instantiation (not on reuse).
@returns The cell object for configuration.
public func reusableCell<T : RBBaseCellView>(type: T.Type, configurationOnCreation: ((_ cell: T) -> Void)? = nil) -> T

Gets an instantiated or reused cell of the given type. The layout view is capable of managing multiple types.
@param type : The type of the cell to reuse or instantiate.
@param applyTheming : Whether or not to apply theming to the cell immediately on creation.
@param configurationOnCreation : An optional block to be called only on instantiation (not on reuse).
@returns The cell object for configuration.
public func reusableCell<T : RBBaseCellView>(type: T.Type, applyTheming: Bool, configurationOnCreation: ((_ cell: T) -> Void)?) -> T

Gets an instantiated or reused cell of the given type. The layout view is capable of managing multiple types. Use this function for objC code.
@param type : The type of the cell to reuse or instantiate.
@param applyTheming : Whether or not to apply theming to the cell immediately on creation.
@param configurationOnCreation : An optional block to be called only on instantiation (not on reuse).
@returns The cell object for configuration.
public func objCReusableCell(type: RBBaseCellView.Type, applyTheming: Bool, configurationOnCreation: ((_ cell: RBBaseCellView) -> Void)?) -> RBBaseCellView

Called when the layout view will reload it's cells from the data source.
open func willReloadData()

Called when the layout view has reloaded it's cells from the data source.
open func didReloadData()

public func gestureRecognizer(_ gestureRecognizer: UIGestureRecognizer, shouldReceive touch: UITouch) -> Bool

public func gestureRecognizer(_ gestureRecognizer: UIGestureRecognizer, shouldRequireFailureOf otherGestureRecognizer: UIGestureRecognizer) -> Bool

public func gestureRecognizer(_ gestureRecognizer: UIGestureRecognizer, shouldRecognizeSimultaneouslyWith otherGestureRecognizer: UIGestureRecognizer) -> Bool

public func triggerWillSelect(at index: Int) -> Bool

public func triggerDidSelect(at index: Int)

public func triggerWillDeselect(at index: Int) -> Bool

public func triggerDidDeselect(at index: Int)

public func triggerWillEnable(at index: Int) -> Bool

public func triggerDidEnable(at index: Int)

public func triggerWillDisable(at index: Int) -> Bool

public func triggerDidDisable(at index: Int)

public func triggerShouldHighlight(at index: Int) -> Bool

public func triggerDidHighlight(at index: Int)

public func triggerDidUnhighlight(at index: Int)

public func triggerButtonAreaCanOpen(at index: Int) -> Bool

public func triggerButtonAreaDidOpen(at index: Int)

public func triggerButtonAreaDidClose(at index: Int)

public func triggerButtonAreaDidSelect(at index: Int, withIdentifier identifier: String, area: Bool)

public func setCellSelectedAt(_ index: Int, selected: Bool, ask: Bool, withEvents: Bool, retheme: Bool, animated: Bool) -> Bool

public func setCellEnabledAt(_ index: Int, enabled: Bool, ask: Bool, withEvents: Bool, retheme: Bool, animated: Bool) -> Bool

public func setCellHighlightedAt(_ index: Int, highlighted: Bool, animated: Bool) -> Bool

public func rangeIsValid() -> Bool

public func updateCells(withViewport viewport: CGRect)

public func cell(for index: Int) -> RBBaseCellView?

public func unloadAllCells()

Reloads the cells from the data source.
public func reloadData()

Reloads the cells from the data source at the given index. Note only does so if the cell is currently visible.
@param index : The index of the cell.
public func reloadCell(at index: Int)