TMHorizontalBarLayout
@MainActor
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
@MainActor open override var contentMode: TMBarLayout.ContentMode { get set } -
Spacing between each button.
Declaration
Swift
@MainActor 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
@MainActor open var showSeparators: Bool { get set } -
The color of vertical separators if they are visible.
Defaults to the system tint color.
Declaration
Swift
@MainActor 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
@MainActor open var separatorInset: UIEdgeInsets? { get set } -
Width of vertical separators if they are visible.
Defaults to
1.0.Declaration
Swift
@MainActor open var separatorWidth: CGFloat? { get set }
-
Declaration
Swift
@MainActor open override func layout(in view: UIView) -
Declaration
Swift
@MainActor open override func insert(buttons: [TMBarButton], at index: Int) -
Declaration
Swift
@MainActor open override func remove(buttons: [TMBarButton]) -
Declaration
Swift
@MainActor open override func focusArea(for position: CGFloat, capacity: Int) -> CGRect
View on GitHub
Install in Dash
TMHorizontalBarLayout Class Reference