You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Observes values on `keyPath` starting from `self` with `options` and retains `self` if `retainSelf` is set.
74
+
75
+
`observe` is just a simple and performant wrapper around KVO mechanism.
76
+
77
+
* it can be used to observe paths starting from `self` or from ancestors in ownership graph (`retainSelf = false`)
78
+
* it can be used to observe paths starting from descendants in ownership graph (`retainSelf = true`)
79
+
* the paths have to consist only of `strong` properties, otherwise you are risking crashing the system by not unregistering KVO observer before dealloc.
80
+
81
+
If support for weak properties is needed or observing arbitrary or unknown relationships in the
82
+
ownership tree, `observeWeakly` is the preferred option.
83
+
84
+
- parameter keyPath: Key path of property names to observe.
0 commit comments