HUBComponentFactory
@protocol HUBComponentFactory <NSObject>
Protocol implemented by objects that create Hub Framework components
You implement a component factory to be able to integrate your component(s) with the framework.
Each factory is registered with HUBComponentRegistry
for a certain namespace, and will be used
whenever a component model declares that namespace as part of its component identifier.
-
Create a new component matching a name
Returning
nil
from this method will cause a fallback component to be used, using the application’sHUBComponentFallbackHandler
and the component model’sHUBComponentCategory
.Declaration
Objective-C
- (nullable id<HUBComponent>)createComponentForName:(nonnull NSString *)name;
Parameters
name
The name of the component to create