CKComponentHostingView Class Reference

Conforms to :
<
>
ContextType
ModelType
NSObject
__covariant
id
Declared in CKComponentHostingView.h
CKComponentHostingViewInternal.h

Overview

A view that renders a single component.

Other Methods

  delegate

Notified when the view’s ideal size (measured by -sizeThatFits:) may have changed.

@property (nonatomic, weak) id<CKComponentHostingViewDelegate> delegate

Declared In

CKComponentHostingView.h

– initWithComponentProviderFunc:sizeRangeProvider:

Convenience initializer that uses default analytics listener

- (instancetype)initWithComponentProviderFunc:(CKComponent *_Nullable ( *_Nonnull ) ( ModelType model , ContextType context ))componentProvider sizeRangeProvider:(id<CKComponentSizeRangeProviding>)sizeRangeProvider

Parameters

componentProvider

provider conforming to CKComponentProvider protocol.

sizeRangeProvider

sizing range provider conforming to CKComponentSizeRangeProviding.

Declared In

CKComponentHostingView.h

– updateModel:mode:

Updates the model used to render the component.

- (void)updateModel:(ModelType _Nullable)model mode:(CKUpdateMode)mode

Declared In

CKComponentHostingView.h

– updateContext:mode:

Updates the context used to render the component.

- (void)updateContext:(ContextType _Nullable)context mode:(CKUpdateMode)mode

Declared In

CKComponentHostingView.h

– hostingViewWillAppear

Appearance events to be funneled to the component tree.

- (void)hostingViewWillAppear

Declared In

CKComponentHostingView.h

– updateAccessibilityStatus:mode:

Updates the accessibility status.

- (void)updateAccessibilityStatus:(BOOL)accessibilityStatus mode:(CKUpdateMode)mode

Declared In

CKComponentHostingView.h

Other Methods

– applyResult:

Applies a result from a component built outside the hosting view. Main thread only.

- (void)applyResult:(const CKBuildComponentResult &)result

Declared In

CKComponentHostingViewInternal.h

– reloadWithMode:

Calling this method will re-generate the underlying component hierarchy without component reuse. Use case could be reloading a hosting view when CKComponentContext should be updated.

- (void)reloadWithMode:(CKUpdateMode)mode

Declared In

CKComponentHostingViewInternal.h