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
eventthe event to link to
closurethe 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
valuethe value to show
-
Set the lowest and highest note labels of the keyboard
Declaration
Swift
func setVisibleKeyLabels(from: String, to: String)Parameters
fromthe lowest note
tothe 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
eventthe 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
statestate to set the button to, true if currently editing preset visibility or false if not
View on GitHub
InfoBar Protocol Reference