The bar is responsible for conveying the current page position of a
TabmanViewController, and providing the user with the ability to interact with the page view controller indirectly. In Tabman, this comes in the form of
TMBar, a protocol that is restricted to
TMBar instances can be added to a
TabmanViewController and are then internally managed by the view controller.
- Layout (
TMBarLayout) - responsible for dictating the layout and display of the bar.
- Buttons (
TMBarButton) - interactable views that directly map to each bar item.
- Indicator (
TMBarIndicator) - view that indicates the currently active item.
These components are defined with generic type constraints on
TMBarView, providing a huge amount of customization and flexibility. In all likelyhood you will not have to create your own
TMBar but if required it is absolutely possible.
TMBaris a protocol that is constrained to
UIViewtypes. Conforming view types can be added to and displayed in a
TMBaris expected to display a
TMBarItemcollection provided by a data source visually in some form, and also respond to the current page position.
The default implementation of
TMBarin Tabman is
public protocol TMBar : UIView, BaseTMBar
Definition of an item that can be displayed in a
Properties of a
TMBarItemableare optionally displayed in a
TMBardepending on the layout / configuration.
Tabman adds extensions to UIKit components to natively support
TMBarItemable, such as
UITabBarItem. Therefore for example, simply returning a
TMBarItemableis fully supported.
public protocol TMBarItemable : AnyObject