CKComponentGenerator Class Reference
| Inherits from | NSObject |
|---|---|
| Declared in | CKComponentGenerator.h |
Overview
CKComponentGenerator is responsibile for maintaining scope root, generating component and listening to component state update.
It exposes methods to generate component synchronously and asynchronously.
All APIs should be called on the affinedQueue that is passed in from CKComponentGeneratorOptions.
– updateModel:
Updates the model used to render the component.
- (void)updateModel:(id<NSObject>)modelDeclared In
CKComponentGenerator.h
– updateContext:
Updates the context used to render the component.
- (void)updateContext:(id<NSObject>)contextDeclared In
CKComponentGenerator.h
– updateTraitCollection:
Set this so that calling UITraitCollection.currentTraitCollection in component returns desired value.
- (void)updateTraitCollection:(UITraitCollection *)traitCollectionDeclared In
CKComponentGenerator.h
– updateAccessibilityStatus:
Set to indicate if the assistive technologies are enabled.
- (void)updateAccessibilityStatus:(BOOL)accessibilityEnabledDeclared In
CKComponentGenerator.h
– generateComponentSynchronously
Generate component synchronously on affined queue and return the result.
- (CKBuildComponentResult)generateComponentSynchronouslyDeclared In
CKComponentGenerator.h
– generateComponentAsynchronously
Generate component asynchronously on a global background queue.
CKComponentGeneratorDelegate.componentGenerator:didAsynchronouslyGenerateComponentResult: will be called once it
finishes generation.
- (void)generateComponentAsynchronouslyDeclared In
CKComponentGenerator.h
– forceReloadInNextGeneration
Force a complete components reload (ignoring all reuse options) in next component generation.
This should be used if you are going to update CKComponentContext in the hierarchy.
- (void)forceReloadInNextGenerationDeclared In
CKComponentGenerator.h
– scopeRoot
The underlying scope root that is maintained by CKComponentGenerator.
- (CKComponentScopeRoot *)scopeRootDeclared In
CKComponentGenerator.h
– setScopeRoot:
This is a temporary API for code migration. DO NOT USE.
- (void)setScopeRoot:(CK : : NonNull<CKComponentScopeRoot*>)scopeRootDeclared In
CKComponentGenerator.h