GiniBarButton
public final class GiniBarButton
A custom navigation bar button that displays a stack of subviews.
Use the GiniBarButton class to create a custom toolbar button with a stack of subviews. This allows you to customize the appearance and behavior of the button by adding and configuring subviews within the stack view. The GiniBarButton class provides a convenient interface for creating a UIBarButtonItem with a custom view, and includes several helper methods for managing the subviews of the stack view.
-
Adds a tap gesture recognizer to the stack view with the specified target and action.
Use the
addAction(_ target: Any?, _ action: Selector)function to call the specified action. When the tap gesture is recognized, the action method specified by theactionparameter will be called on thetargetobject.Declaration
Swift
public func addAction(_ target: Any?, _ action: Selector)Parameters
targetThe object that will handle the action message. If this parameter is
nil, the action message will be sent to the first responder.actionThe action method to call on the target object when the tap gesture is recognized.
-
A computed property that returns a
UIBarButtonItemwith thestackViewas its custom view.Use the
barButtonproperty to create aUIBarButtonItemwith thestackViewas its custom view. This allows you to customize the appearance and behavior of the button by adding and configuring subviews within the stack view.Declaration
Swift
public var barButton: UIBarButtonItem { get }Return Value
A
UIBarButtonItemobject with thestackViewas its custom view. -
A computed property that returns a
UIViewwith thestackViewas its content.Use the
buttonViewproperty to create aUIViewwith thestackViewas its content. This allows you to customize the appearance and behavior of the button by adding and configuring subviews within the stack view.Declaration
Swift
public var buttonView: UIView { get }Return Value
A
UIViewobject with thestackViewas its content. -
Initializes a new
GiniBarButtonobject with the specified button type.Use the
init(ofType:)initializer to create a newGiniBarButtonobject with the specifiedBarButtonType. TheBarButtonTypeparameter determines the appearance and behavior of the button.Declaration
Swift
public init(ofType type: BarButtonType)Parameters
typeThe
BarButtonTypethat determines the appearance and behavior of the button.
View on GitHub
GiniBarButton Class Reference