-
subscript(dynamicMember:)Extension methodAccesses a member of wrapped component with key path.
Declaration
Swift
@inlinable subscript<T>(dynamicMember keyPath: KeyPath<Wrapped, T>) -> T { get }
-
reuseIdentifierExtension methodA string used to identify a element that is reusable. Default is the type name of
self.Declaration
Swift
@inlinable var reuseIdentifier: String { get } -
renderContent()Extension methodReturns a new instance of
Content.Declaration
Swift
@inlinable func renderContent() -> Wrapped.ContentReturn Value
A new
Contentinstance. -
render(in:)Extension methodRender properties into the content.
Declaration
Swift
@inlinable func render(in content: Wrapped.Content) -
referenceSize(in:)Extension methodReturns the referencing size of content to render on the list UI.
Note
Only
CGSize.heightis used to determine the size of element inUITableView.Declaration
Swift
@inlinable func referenceSize(in bounds: CGRect) -> CGSize?Return Value
The referencing size of content to render on the list UI. If returns nil, the element of list UI falls back to its default size like
UITableView.rowHeightorUICollectionViewFlowLayout.itemSize. -
shouldContentUpdate(with:)Extension methodReturns a
Boolvalue indicating whether the content should be reloaded.Note
Unlike
Equatable, this doesn’t compare whether the two values exactly equal. It’s can be ignore property comparisons, if not expect to reload content.Declaration
Swift
@inlinable func shouldContentUpdate(with next: Self) -> BoolReturn Value
A
Boolvalue indicating whether the content should be reloaded. -
shouldRender(next:in:)Extension methodReturns a
Boolvalue indicating whether component should be render again.Declaration
Swift
@inlinable func shouldRender(next: Self, in content: Wrapped.Content) -> BoolParameters
nextThe next value to be compared to the receiver.
contentAn instance of content laid out on the element.
Return Value
A
Boolvalue indicating whether the component should be render again. -
layout(content:in:)Extension methodLayout the content on top of element of the list UI.
Note
UIViewandUIViewControllerare laid out with edge constraints by default.Declaration
Swift
@inlinable func layout(content: Wrapped.Content, in container: UIView)Parameters
contentAn instance of content to be laid out on top of element.
containerA container view to layout content.
-
intrinsicContentSize(for:)Extension methodThe natural size for the passed content.
Declaration
Swift
func intrinsicContentSize(for content: Wrapped.Content) -> CGSizeReturn Value
A
CGSizevalue represents a natural size of the passed content. -
contentWillDisplay(_:)Extension methodInvoked every time of before a component got into visible area.
Declaration
Swift
@inlinable func contentWillDisplay(_ content: Wrapped.Content) -
contentDidEndDisplay(_:)Extension methodInvoked every time of after a component went out from visible area.
Declaration
Swift
@inlinable func contentDidEndDisplay(_ content: Wrapped.Content)
View on GitHub
ComponentWrapping Protocol Reference