How can get access to EnvironmentObject of a View in another class outside of that view in SwiftUI?

前端 未结 0 1820
陌清茗
陌清茗 2021-01-11 14:10

I am using @EnvironmentObject in my SwiftUI project, I need to get access to the var of @EnvironmentObjectt in an another class outside of a view, how can I do this?

相关标签:
回答
  • 消灭零回复
提交回复
热议问题