-
subscript(dynamicMember:)
Extension methodAccesses a member of wrapped component with key path.
Declaration
Swift
@inlinable subscript<T>(dynamicMember keyPath: KeyPath<Wrapped, T>) -> T { get }
-
reuseIdentifier
Extension 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.Content
Return Value
A new
Content
instance. -
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.height
is 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.rowHeight
orUICollectionViewFlowLayout.itemSize
. -
shouldContentUpdate(with:)
Extension methodReturns a
Bool
value 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) -> Bool
Return Value
A
Bool
value indicating whether the content should be reloaded. -
shouldRender(next:in:)
Extension methodReturns a
Bool
value indicating whether component should be render again.Declaration
Swift
@inlinable func shouldRender(next: Self, in content: Wrapped.Content) -> Bool
Parameters
next
The next value to be compared to the receiver.
content
An instance of content laid out on the element.
Return Value
A
Bool
value indicating whether the component should be render again. -
layout(content:in:)
Extension methodLayout the content on top of element of the list UI.
Note
UIView
andUIViewController
are laid out with edge constraints by default.Declaration
Swift
@inlinable func layout(content: Wrapped.Content, in container: UIView)
Parameters
content
An instance of content to be laid out on top of element.
container
A container view to layout content.
-
intrinsicContentSize(for:)
Extension methodThe natural size for the passed content.
Declaration
Swift
func intrinsicContentSize(for content: Wrapped.Content) -> CGSize
Return Value
A
CGSize
value 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)