ObservableObject
public extension ObservableObject
-
Returns a
LoadableSubject
that wraps a key path of anObservableObject
intoBinding
.Declaration
Swift
func loadableSubject<Value>(_ keyPath: WritableKeyPath<Self, Loadable<Value>>) -> LoadableSubject<Value>
Parameters
keyPath
The key path of the
Loadable
property within theObservableObject
.Return Value
A
LoadableSubject
that tracks the state of theLoadable
property.