Defining Actions

  • A type that describes a particular action that the user can perform and how to perform it.

    There are several subprotocols of UserAction that each provide a different way for types to define how they perform a user action:

    To implement a user action, a type should conform to exactly one of the above protocols and implement the appropriate method to define how to do its work.

    See more

    Declaration

    Swift

    public protocol UserAction
  • A type of UserAction that performs destructive work which may be worth confirming with the user.

    Conformance to this protocol should be added in addition to one of the other UserAction protocols.

    See more

    Declaration

    Swift

    public protocol DestructiveUserAction : UserAction