Add documentation

This commit is contained in:
Carson Katri 2022-07-05 18:15:07 -04:00
parent bb92ddfb46
commit a7a421c898
1 changed files with 3 additions and 0 deletions

View File

@ -26,6 +26,7 @@ public protocol FiberRenderer {
/// Check whether a `View` is a primitive for this renderer.
static func isPrimitive<V>(_ view: V) -> Bool where V: View
/// Override the default `_visitChildren` implementation for a primitive `View`.
func visitPrimitiveChildren<Primitive, Visitor>(
_ view: Primitive
) -> ViewVisitorF<Visitor>? where Primitive: View, Visitor: ViewVisitor
@ -40,6 +41,8 @@ public protocol FiberRenderer {
var defaultEnvironment: EnvironmentValues { get }
/// The size of the window we are rendering in.
///
/// Layout is automatically updated whenever the size changes.
var sceneSize: CurrentValueSubject<CGSize, Never> { get }
/// Whether layout is enabled for this renderer.