TMBarView
@MainActor
open class TMBarView<Layout, Button, Indicator> : UIView, TMTransitionStyleable, TMBarLayoutParent where Layout : TMBarLayout, Button : TMBarButton, Indicator : TMBarIndicator
extension TMBarView: TMBar
TMBarView is the default Tabman implementation of TMBar. A UIView that contains a TMBarLayout which displays
a collection of TMBarButton, and also a TMBarIndicator. The types of these three components are defined by constraints
in the TMBarView type definition.
-
TMBarLayoutthat dictates display and behavior of bar buttons and other bar view components.Declaration
Swift
@MainActor public private(set) lazy var layout: Layout { get set } -
Collection of
TMBarButtonobjects that directly map to theTMBarItems provided by thedataSource.Declaration
Swift
@MainActor public let buttons: TMBarButtonCollection<Button> -
TMBarIndicatorthat is used to indicate the current bar index state.Declaration
Swift
@MainActor public let indicator: Indicator -
Background view that appears behind all content in the bar view.
Note: Default style is
.blur(style: .extraLight).Declaration
Swift
@MainActor public let backgroundView: TMBarBackgroundView -
Items that are displayed in the bar.
Declaration
Swift
@MainActor open private(set) var items: [TMBarItemable]? { get } -
Object that acts as a data source to the BarView.
Declaration
Swift
@MainActor open weak var dataSource: TMBarDataSource? -
Object that acts as a delegate to the BarView.
By default this is set to the
TabmanViewControllerthe bar is added to.Declaration
Swift
@MainActor open weak var delegate: TMBarDelegate?
-
View to display on the left (or leading) edge of the bar.
This view is within the scroll view and is subject to scroll off-screen with bar contents.
Declaration
Swift
@MainActor open var leftAccessoryView: UIView? { get set } -
View to display on the left (or leading) edge of the bar.
This view is not part of the scrollable bar contents and will be visible at all times.
Declaration
Swift
@MainActor open var leftPinnedAccessoryView: UIView? { get set } -
View to display on the right (or trailing) edge of the bar.
This view is within the scroll view and is subject to scroll off-screen with bar contents.
Declaration
Swift
@MainActor open var rightAccessoryView: UIView? { get set } -
View to display on the right (or trailing) edge of the bar.
This view is not part of the scrollable bar contents and will be visible at all times.
Declaration
Swift
@MainActor open var rightPinnedAccessoryView: UIView? { get set }
-
The type of scrolling interaction to allow.
Options:
.interactive: The bar contents can be scrolled interactively..swipe: The bar contents can be scrolled through with swipe gestures..none: The bar contents can’t be scrolled at all.
Declaration
Swift
@MainActor open var scrollMode: ScrollMode { get set } -
Whether to fade the leading and trailing edges of the bar content to an alpha of 0.
Declaration
Swift
@MainActor open var fadesContentEdges: Bool { get set } -
Spacing between components in the bar, such as between the layout and accessory views.
Defaults to
8.0.Declaration
Swift
@MainActor open var spacing: CGFloat { get set }
-
Declaration
Swift
@MainActor public func reloadData(at indexes: ClosedRange<Int>, context: TMBarReloadContext) -
Declaration
Swift
@MainActor public func update(for position: CGFloat, capacity: Int, direction: TMBarUpdateDirection, animation: TMAnimation)
View on GitHub
Install in Dash
TMBarView Class Reference