Classes
The following classes are available globally.
-
A concrete content operation type that is executed using a block
You can use this type to implement lightweight content operations, that don’t have the need to be asynchronous or support rescheduling. You simply give a block when initializing an instance of this class, and that block becomes the body of the content operation.
For more flexibility, implement your own content operation using
See moreHUBContentOperation.Declaration
Objective-C
@interface HUBBlockContentOperation : NSObject <HUBContentOperation>
-
A concrete content opereation factory implementation that uses a block
You can use this content operation factory in case you want to implement a simple factory that doesn’t need any injected dependencies or complex logic. For more advanced use cases, see the
See moreHUBContentOperationFactoryprotocol, that you can implement in a custom object.Declaration
Objective-C
@interface HUBBlockContentOperationFactory : NSObject <HUBContentOperationFactory>
-
Collection view cell that can be used to display a Hub Framework component
The Hub Framework uses this collection view cell internally to wrap component views, manage their size, reuse, etc. If you’re building a component that uses a nested
See moreUICollectionViewto display child components, you can use this cell class to easily be able to render your child components.Declaration
Objective-C
@interface HUBComponentCollectionViewCell : UICollectionViewCell
-
A component identifier is used to match a
HUBComponentModelto aHUBComponentimplementationComponent identifiers have two parts; a
namespaceand aname. The namespace is used to resolve whichHUBComponentFactoryto use to create a component for a model, and the name is then passed to that factory when it’s asked to create a component.You can create component identifiers programmatically, or supply string representations when using JSON data using the
See morenamespace:nameformat.Declaration
Objective-C
@interface HUBIdentifier : NSObject <NSCopying>
-
This class is the main entry point into the Hub Framework
An application using the Hub Framework should create a single instance of this class and retain it in a central location (such as its App Delegate). This class exposes the public API of the Hub Framework in a modular fashion, with each part of the API encapsulated in either a registry or a factory.
See moreDeclaration
Objective-C
@interface HUBManager : NSObject
-
View controller used to render a Hub Framework-powered view
You don’t create instances of this class directly. Instead, you use
HUBViewControllerFactoryto do so.This view controller renders
See moreHUBComponentinstances using a collection view. What components that are rendered are determined byHUBContentOperations that build aHUBViewModel.Declaration
Objective-C
@interface HUBViewController : UIViewController
-
Class used to define predicates that evaulates whether a view URI should be handled by the Hub Framework
A view URI predicate is passed when registering a feature with
HUBFeatureRegistry, and is used by the Hub Framework to determine whether it should handle a certain view URI when a view controller or view model loader is requested.You can construct simple predicates that only successfully evaluates a constant view URI, or enable a tree of view URIs using a root view URI, as well as using a block or
See moreNSPredicateto construct complex predicates that evaluate based on any condition.Declaration
Objective-C
@interface HUBViewURIPredicate : NSObject
View on GitHub
Install in Dash
Classes Reference