Index

RBBaseLayoutView.swift

Enumerations

Classes


RBBaseLayoutView

The abstract base class for layout views.

Properties

Whether or not a schema based is supported by this layout.
public var supportsSchemaBasedPositioners Bool { get }

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

The animator to animate cells as they appear and disappear.
public var animator RBLayoutAnimator? { get set }

Whether or not animation should occur during scrolling only. Default = true.
public var animateScrollOnly Bool { get set }

An array of the cells that are currently visible.
public var visibleCells RBFragmentedArray { get set }

Whether or not an appearing or disappearing cell should animate.
public var shouldAnimate Bool { get }

Whether or not scrolling should be disabled. Override this to disable scrolling while you perform an update.
public var shouldDisableScrolling Bool { get }

Indicates whether or not laying out cells, reloadData, reloadCellAt and changes to viewports will update the view.
public var layoutUpdatesPaused Bool { get set }

open var contentSize CGSize { get set }

open var contentInset UIEdgeInsets { get set }

open var isScrollEnabled Bool { get set }

Functions

The frame of the cell at the given index.
@param index : The index of the cell.
@returns The frame of the cell or CGRectNull if a cell with the requested index does not exist.
open func cellFrame(at index: Int) -> CGRect

Scroll to the given cell index.
@param index : The index of the cell.
@param position : The position of the cell.
@param orientation : The orientation of the scrolling movement.
@param offset : An additional offset to apply to the scroll position.
@param animated : Animate the scrolling.
open func scrollToCell(at index: Int, position: RBBaseLayoutViewScrollPosition, orientation: RBOrientation, offset: CGFloat, animated: Bool)

Pauses layout updates to the view. Useful if doing custom animations etc.
open func pauseLayoutUpdates()

Resumes any pending or updates to the view.
open func resumeLayoutUpdates()

Called when a cell will be positioned with a new frame.
@param view : The view of the cell.
@param index : The index of the cell in the layout view.
@param frame : The new frame being applied to the cell.
open func cellWillPosition(_ view: UIView, with index: Int, withFrame frame: CGRect)

Called when a cell was positioned with a new frame.
@param view : The view of the cell.
@param index : The index of the cell in the layout view.
@param frame : The new frame being applied to the cell.
open func cellDidPosition(_ view: UIView, with index: Int, withFrame frame: CGRect)

Called when a cell will appear.
@param view : The view of the cell.
@param index : The index of the cell in the layout view.
@param frame : The frame that the cell is appearing with.
open func cellWillAppear(_ view: UIView, with index: Int, withFrame frame: CGRect)

Called when a cell did appear.
@param view : The view of the cell.
@param index : The index of the cell in the layout view.
@param frame : The frame that the cell is appearing with.
open func cellDidAppear(_ view: UIView, with index: Int, withFrame frame: CGRect)

Called when a cell will disappear.
@param view : The view of the cell.
@param index : The index of the cell in the layout view.
open func cellWillDisappear(_ view: UIView, with index: Int)

Called when a cell did disappear.
@param view : The view of the cell.
@param index : The index of the cell in the layout view.
open func cellDidDisappear(_ view: UIView, with index: Int)

public func positionerWasInvalidated(positioner: RBPositioner)