StaticViewFactory
@MainActor
public protocol StaticViewFactory
A factory that creates optional contained UIViews should conform to this protocol.
-
A type of the view to build.
Declaration
Swift
associatedtype View : UIView -
Factory method that will be called by the corresponding container
UIViewDeclaration
Swift
@MainActor static func buildView(within bounds: CGRect) -> View?Parameters
boundsA bounds rect of the container.
Return Value
Build
UIViewinstance.
-
buildView(within:Default implementation) Default Implementation
Default extension build the
UIViewusing its default constructor.Declaration
Swift
@MainActor static func buildView(within bounds: CGRect) -> Self?