InfoBar

public protocol InfoBar : AnyObject

Handles the actions and display of items in a hypothetical info bar above the keyboard

  • Link a button / gesture event to a target/selector combination

    Declaration

    Swift

    func addEventClosure(_ event: InfoBarEvent, _ closure: @escaping UIControl.Closure)

    Parameters

    event

    the event to link to

    closure

    the closure to invoke when the event appears

  • Show status information on the bar. This will appear temporarily and then fade back to the patch name.

    Declaration

    Swift

    func setStatusText(_ value: String)

    Parameters

    value

    the value to show

  • Set the lowest and highest note labels of the keyboard

    Declaration

    Swift

    func setVisibleKeyLabels(from: String, to: String)

    Parameters

    from

    the lowest note

    to

    the highest note

  • True if there are more buttons to be seen

    Declaration

    Swift

    var moreButtonsVisible: Bool { get }
  • Show the remaining buttons

    Declaration

    Swift

    func showMoreButtons()
  • Hide the remaining buttons

    Declaration

    Swift

    func hideMoreButtons()
  • Reset a button state for a given event. Some buttons show an ‘active’ state while another piece of UI is visible. This provides a programatic way to reset the button to the ‘inactive’ state.

    Declaration

    Swift

    func resetButtonState(_ event: InfoBarEvent)

    Parameters

    event

    the event associated with the button to reset

  • Update the enabled state of the button that begins preset visibility editing.

    Declaration

    Swift

    func setEditVisibilityButtonEnabled(_ state: Bool)

    Parameters

    state

    state to set the button to, true if currently editing preset visibility or false if not