Type Definitions
The following type definitions are available globally.
-
Type of block used by
HUBBlockContentOperationFactory
to create content operationsDeclaration
Objective-C
typedef NSArray<id<HUBContentOperation>> *_Nonnull ( ^HUBContentOperationFactoryBlock)(NSURL *_Nonnull)
-
Type for objects that describe a component category to use for fallbacks using
HUBComponentFallbackHandler
An application using the Hub Framework can declare any number of categories to use when performing fallback logic for components, in case an unknown component namespace/name combo was encountered.
Ideally, a component category should be generic enough to apply to a range of components with similar visuals and behavior, but still contain enough information for a
HUBComponentFallbackHandler
to create appropriate fallback components based on them.Declaration
Objective-C
typedef NSString *HUBComponentCategory
-
Type for objects that describe a layout trait to use in a
HUBComponentLayoutManager
to compute marginsMargins between various components and the content edge of a view is determined by inspecting the layout traits of a given component. Each component has the opportunity to declare its traits through the
layoutTraits
property ofHUBComponent
.An application using the Hub Framework may declare additional traits using this type, as its up to the implementation of
HUBComponentLayoutManager
(controlled by the application) to determine how to map traits to absolute margins.Ideally, a layout trait should be generic enough to apply to a broad range of components, but still contain enough information for a
HUBComponentLayoutManager
to make correct decisions based on them.Declaration
Objective-C
typedef NSString *HUBComponentLayoutTrait
-
Block type used when running a custom block as a JSON path operation
Declaration
Objective-C
typedef id _Nullable (^HUBMutableJSONPathBlock)(NSObject *_Nonnull)