HUBActionPerformer
@protocol HUBActionPerformer <NSObject>
Protocol defining the public API of an object that performs Hub Framework actions
You use this API to manually perform actions from either a component (conforming to
HUBComponentActionPerformer) or content operation (conforming to
HUBContentOperationActionPerformer).
Actions are used to define custom behavior and/or to communicate between the parts that make up a Hub Framework-powered view.
You don’t conform to this protocol yourself. Instead, the Hub Framework will assign
an object conforming to this protocol to the actionPerformer property of either a
component or content operation.
-
Perform an action with a given identifier, optionally passing custom data as well
Declaration
Objective-C
- (BOOL)performActionWithIdentifier:(nonnull HUBIdentifier *)identifier customData:(nullable NSDictionary<NSString *, id> *) customData;Parameters
identifierThe identifier of the action to perform. Will be resolved to a
HUBActionif matching aHUBActionFactoryregistered withHUBActionRegistryfor the given identifier’s namespace part.customDataAny custom data to send to the action. Will be available on the
HUBActionContextpassed to the action when performed.Return Value
A boolean indicating whether the action was successfully performed or not.
NOwill be returned if either no action could be created for the given identifier, or if the resolved action returnedNOwhen being performed.
View on GitHub
Install in Dash
HUBActionPerformer Protocol Reference