UAActionRegistryEntry

@interface UAActionRegistryEntry : NSObject

An entry in the UAActionRegistry.

  • The entry’s action.

    Declaration

    Objective-C

    @property (readwrite, strong, nonatomic) UAAction *_Nonnull action;

    Swift

    var action: UAAction { get set }
  • The entry’s predicate.

    Declaration

    Objective-C

    @property (readwrite, copy, nonatomic, nullable) UAActionPredicate predicate;

    Swift

    var predicate: UAActionPredicate? { get set }
  • Registered names

    Declaration

    Objective-C

    @property (readonly, nonatomic) NSArray<NSString *> *_Nonnull names;

    Swift

    var names: [String] { get }
  • UAActionRegistryEntry class factory method.

    Declaration

    Objective-C

    + (nonnull instancetype)entryForAction:(nonnull UAAction *)action
                                 predicate:(nonnull UAActionPredicate)predicate;

    Swift

    convenience init(for action: UAAction, predicate: @escaping UAActionPredicate)

    Parameters

    action

    The entry’s action.

    predicate

    The entry’s predicate.

  • UAActionRegistryEntry class factory method.

    Declaration

    Objective-C

    + (nonnull instancetype)entryForActionClass:(nonnull Class)actionClass
                                      predicate:
                                          (nonnull UAActionPredicate)predicate;

    Swift

    convenience init(forActionClass actionClass: AnyClass, predicate: @escaping UAActionPredicate)

    Parameters

    actionClass

    The entry’s action class.

    predicate

    The entry’s predicate.

  • Returns the action for the situation, or the default action if there are no situation overrides.

    Declaration

    Objective-C

    - (nonnull UAAction *)actionForSituation:(UASituation)situation;

    Swift

    func action(for situation: UASituation) -> UAAction

    Parameters

    situation

    The specified UASituation enum value

    Return Value

    UAAction for the situation.