TMHorizontalBarLayout
open class TMHorizontalBarLayout : TMBarLayout
Layout that displays bar buttons sequentially along the horizontal axis.
Simple but versatile, TMHorizontalBarLayout lays BarButtons out in a horizontal UIStackView.
-
Declaration
Swift
open override var contentMode: TMBarLayout.ContentMode { get set } -
Spacing between each button.
Declaration
Swift
open var interButtonSpacing: CGFloat { get set }
-
Whether to display vertical separators between each button.
If set to
true, the separators will display between each button at intervals half way along theinterButtonSpacingvalue.Defaults to
false.Declaration
Swift
open var showSeparators: Bool { get set } -
The color of vertical separators if they are visible.
Defaults to the system tint color.
Declaration
Swift
open var separatorColor: UIColor? { get set } -
Inset to apply to vertical separators if they are visible.
Applying values to the vertical (top / bottom) values will inset the separator from the vertical bounds of the button. Adding value to the horizontal values (left / right) will effectively increase the padding around the separator, in addition to the layout spacing.
Defaults to
UIEdgeInsets(top: 4.0, left: 0.0, bottom: 4.0, right: 0.0).Declaration
Swift
open var separatorInset: UIEdgeInsets? { get set } -
Width of vertical separators if they are visible.
Defaults to
1.0.Declaration
Swift
open var separatorWidth: CGFloat? { get set }
-
Declaration
Swift
open override func layout(in view: UIView) -
Declaration
Swift
open override func insert(buttons: [TMBarButton], at index: Int) -
Declaration
Swift
open override func remove(buttons: [TMBarButton]) -
Declaration
Swift
open override func focusArea(for position: CGFloat, capacity: Int) -> CGRect
View on GitHub
Install in Dash
TMHorizontalBarLayout Class Reference