HUBComponentTargetBuilder

@protocol HUBComponentTargetBuilder <HUBJSONCompatibleBuilder>

Protocol defining the public API for a builder that builds component target objects

This builder acts like a mutable model counterpart for HUBComponentTarget, with the key difference that they are not related by inheritance.

All properties are briefly documented as part of this protocol, but for more extensive documentation and use case examples, see the full documentation in the HUBComponentTarget protocol definition.

  • URI

    Any URI that should be opened when the user interacts with the target’s component

    Declaration

    Objective-C

    @property (readwrite, copy, nonatomic, nullable) NSURL *URI;
  • Any initial view model tha should be used for any Hub Framework-powered target view

    Declaration

    Objective-C

    @property (readonly, strong, nonatomic)
        id<HUBViewModelBuilder> _Nonnull initialViewModelBuilder;
  • The identifiers of any custom actions that should be performed when the target is executed

    Declaration

    Objective-C

    @property (readonly, strong, nonatomic)
        NSMutableOrderedSet<HUBIdentifier *> *_Nonnull actionIdentifiers;
  • Any custom data to associate with the target

    Declaration

    Objective-C

    @property (readwrite, copy, nonatomic, nullable)
        NSDictionary<NSString *, id> *customData;
  • Add a custom action identifier to this target

    This method is an alias/convenience API for [self.actionIdentifiers addObject:].

    Declaration

    Objective-C

    - (void)addActionWithNamespace:(nonnull NSString *)actionNamespace
                              name:(nonnull NSString *)actionName;

    Parameters

    actionNamespace

    The namespace part of the action’s identifier

    actionName

    The name part of the action’s identifier