Skip to content

Commit 7fdbe94

Browse files
committed
Improve documentation comments.
Co-authored-by:Andrew Watt <[email protected]>
1 parent ceac6b7 commit 7fdbe94

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

ViewEnvironmentUI/Sources/ViewEnvironmentPropagating.swift

+6-4
Original file line numberDiff line numberDiff line change
@@ -68,9 +68,10 @@ public protocol ViewEnvironmentPropagating {
6868
/// ``ViewEnvironmentPropagatingObject/environmentAncestorOverride`` property. If no override is present, the
6969
/// return value will be `parent ?? presentingViewController`/`superview`.
7070
///
71-
/// If the value of the ancestor is `nil`, by default, ancestors will not call notify this node of needing an
72-
/// environment update as it changes. This allows a node to effectively act as a root node when needed (e.g.
73-
/// bridging from other propagation systems like WorkflowUI).
71+
/// If the value of the ancestor is `nil`, by default, ancestors will not notify this node of needing an
72+
/// environment update as it changes. This allows a node to effectively detach from its ancestor and act as a root
73+
/// node when needed, without any changes to the ancestor (e.g. bridging from other propagation systems like
74+
/// WorkflowUI).
7475
///
7576
@_spi(ViewEnvironmentWiring)
7677
var environmentAncestor: ViewEnvironmentPropagating? { get }
@@ -126,7 +127,8 @@ extension ViewEnvironmentPropagating {
126127

127128
/// Notifies all appropriate descendants that the environment needs update.
128129
///
129-
/// If a descendant's ancestor is `nil` it will not be notified of needing update.
130+
/// Ancestor-descendent bindings must be mutually agreed for this method to notify them. If a descendant's ancestor
131+
/// is `nil` it will not be notified of needing update.
130132
///
131133
@_spi(ViewEnvironmentWiring)
132134
public func setNeedsEnvironmentUpdateOnAppropriateDescendants() {

0 commit comments

Comments
 (0)