init(frame:primaryAction:)
Creates a new button with the specified frame, registers the primary action event, and sets the title and image to the action’s title and image.
Declaration
convenience init(frame: CGRect, primaryAction: UIAction?)Parameters
- frame:
The frame rectangle for the view, measured in points.
- primaryAction:
The action to perform when the button is selected. The button registers this action for the Primaryactiontriggered control event and sets the title and image properties to the action’s title and image.