TMBarButton
open class TMBarButton : UIControl
A button that appears in a bar and provides the interaction for initiating a page index update.
-
Bar Item that is associated with the button.
Declaration
Swift
public let item: TMBarItemable
-
Background view.
Declaration
Swift
public let backgroundView: TMBarBackgroundView
-
Content inset of the button contents.
Declaration
Swift
open var contentInset: UIEdgeInsets { get set }
-
Badge View
Declaration
Swift
public let badge: TMBadgeView
-
Whether the button should fade its alpha value when it is unselected.
If enabled the button will interpolate between a minumum alpha of 0.5 and 1.0 depending on the current
selectionState
.Declaration
Swift
open var adjustsAlphaOnSelection: Bool
-
Selection state of the button.
- unselected: Unselected - Current page index is not currently mapped to the button.
- partial: Partially selected - Current page index is either arriving or departing from the mapped button.
- selected: Selected - Current page index is mapped to the button.
Declaration
Swift
public var selectionState: SelectionState { get set }
-
Initialize a bar button.
Declaration
Swift
public required init(for item: TMBarItemable, intrinsicSuperview: UIView?)
Parameters
item
Item to create the bar button for.
intrinsicSuperview
View that can be notified whenever any intrinsic layout changes occur.
-
Layout the Bar Button.
Declaration
Swift
open func layout(in view: UIView)
Parameters
view
The view to use as the root of the button.
-
Layout the badge view for the button.
Declaration
Swift
open func layoutBadge(_ badge: TMBadgeView, in view: UIView)
Parameters
badge
Badge view.
view
View to use for layout.
-
Populate the button with a bar item.
Declaration
Swift
open func populate(for item: TMBarItemable)
Parameters
item
Item to populate.
-
Update the button for a new selection state.
Declaration
Swift
open func update(for selectionState: SelectionState)
Parameters
selectionState
Selection state.
-
Button that is zero height and hidden.
Use this if you do not want visible buttons in the bar.
Declaration
Swift
public final class None : TMBarButton