Contents

buttonWithConfiguration:primaryAction:

Creates a new button with the specified configuration and registers the primary action event.

Declaration

+ (instancetype) buttonWithConfiguration:(UIButtonConfiguration *) configuration primaryAction:(UIAction *) primaryAction;

Parameters

  • configuration:

    The button configuration.

  • primaryAction:

    The action to perform for the Primaryactiontriggered control event.

Return Value

A new button.

Discussion

If the primary action contains a title or an image, this method copies them to the configuration and the button displays them.

See Also

Creating buttons from a configuration object