@EnvironmentObject
declare an environment object
Last updated
Was this helpful?
declare an environment object
Last updated
Was this helpful?
โฉ โฉ @EnvironmentObject
The @EnvironmentObject
is used to declare (in a ) an environment object property provided by an ancester view.
Be sure to set a corresponding instance on an ancester view by calling its modifier.
Use to declare an observable object .
Use to declare in an type.
Use to initialize an observable object.
Use to put the in the environment.
Use @EnvironmentObject
to declare an property provided by an ancestor view.
๏ผ any or object that uses the 's data.
๏ผdata shared with any views in your app.
โฉ โฉ
โฉ (protocol)
โฉ โฉ (property wrapper)
Majid โฉ #todo