Index

RBExtendView.swift

Enumerations

Protocols

Classes


RBExtendView

A base class for extend views for RBExtendContainerView.

Properties

The current factor by which the extend view is revealed (0 - 1). This takes into account the insetBy value. Reveal factor 1 = (dimension - insetBy) where dimension = width or height depending on the position of the extend view.
public var revealFactor CGFloat { get set }

The state of the extend view
public var state RBExtendViewState { get }

The position of the extend view.
public var position RBExtendViewPosition { get set }

The reveal factor at which to consider the extend view opened. Default = 1. If you set a openRevealFactor greater than 1 essentially the extend view can never acheive the 'opened' state. Setting an extend view openRevealFactor greater than 1 can be useful in certain cicrumstances. For certain scenarios and types of extend views it might be useful to have the open state at a different value e.g. 0.75 (75%).
open var openRevealFactor CGFloat { get set }

The animator to use when opening and closing the extend view. Default = defaultAnimator().
public var animator RBAnimator { get set }

A delegate to receive events.
public weak var delegate RBExtendViewDelegate? { get set }

Whether or not the extend view is enabled. If it is not enabled then it is hidden and cannot be revealed or opened. Default = true.
public var enabled Bool { get set }

Whether or not the extend view should close if it is in the open state and the scroll view is dragged in the closing direction. Default = false.
public var closeOnDrag Bool { get set }

Functions

Calculates the exposed area of the extend view for the given reveal factor.
@param factor : The reveal factor.
@returns The exposed region of the extend view.
public func exposedFrame(forRevealFactor factor: CGFloat) -> CGRect

Opens the extend view.
public func open()

Closes the extend view.
public func close()

How much to inset the extend view by. Default = 0. (The view is placed with no inset and so appears hidden). If you would like the extend view to be partially or fully visible provide an inset > 0. The inset value will show the partial/full extend view by the amount provided in the given position.
open func insetBy() -> CGFloat

Whether or not to allow the extend view to remain opened and extended when the opened state is first set. Default = YES.
open func keepExtendedWhenOpen() -> Bool

Called to determine if the extend view may open. Default = YES.
open func shouldOpen() -> Bool

Called when the extend view will open.
open func willOpen()

Called when the extend view did open.
open func didOpen()

Called when the extend view will close.
open func willClose()

Called when the extend view did close.
open func didClose()

Called when the extend view has been added to indicate the side that is was added to.
@param parent : The frame of the parent RBScrollView.
open func positionDidChange(parent: CGRect)

Called when the reveal factor has changed.
@param to : The new reveal factor.
@param from : The previous reveal factor.
open func revealFactorDidChange(_ to: CGFloat, from: CGFloat)