TabmanViewController

open class TabmanViewController : PageboyViewController, PageboyViewControllerDelegate, TMBarDelegate

A view controller which embeds a PageboyViewController and provides the ability to add bars which can directly manipulate, control and display the status of the page view controller. It also handles automatic insetting of child view controller contents.

  • Location of the bar in the view controller.

    • top: Pin to the top of the safe area.
    • bottom: Pin to the bottom of the safe area.
    • navigationItem: Set as a UINavigationItem.titleView.
    • custom: Add the view to a custom view and provide custom layout. If no layout is provided, all edge anchors will be constrained to the superview.
    Declaration

    Swift

    public enum BarLocation
  • All bars that have been added to the view controller.

    Declaration

    Swift

    public private(set) var bars: [any TMBar] { get }
  • Whether to automatically adjust child view controller content insets with bar geometry.

    This must be set before viewDidLoad, setting it after this point will result in no change. Default is true.

    Declaration

    Swift

    public var automaticallyAdjustsChildInsets: Bool
  • The insets that are required to safely layout content between the bars that have been added.

    This will only take account of bars that are added to the .top or .bottom locations - bars that are added to custom locations are responsible for handling their own insets.

    Declaration

    Swift

    public var barInsets: UIEdgeInsets { get }
  • The layout guide representing the portion of the view controller’s view that is not obstructed by bars.

    Declaration

    Swift

    public let barLayoutGuide: UILayoutGuide
  • A method for calculating insets that are required to layout content between the bars that have been added.

    One can override this method with their own implementation for custom bar inset calculation, to take advantage of automatic insets updates for all Tabman’s pages during its lifecycle.

    Declaration

    Swift

    open func calculateRequiredInsets() -> Insets
    Return Value

    information about required insets for current state.

  • Object containing inset data that is required for all bars in a TabmanViewController.

    Declaration

    Swift

    public struct Insets