TMBarViewFocusProvider

@MainActor
public protocol TMBarViewFocusProvider : AnyObject

An object that can provide focus related positional data to a BarView.

  • Calculate the ‘focusArea’ for the current position and capacity.

    This CGRect defines the area of the layout that should currently be highlighted for the selected bar button.

    Declaration

    Swift

    @MainActor
    func focusArea(for position: CGFloat, capacity: Int) -> CGRect
    Parameters
    position

    Current position to display.

    capacity

    Capacity of the bar (items).

    Return Value

    Calculated focus rect. *