A

Admin • 670.22K Points
Coach

Q. Which property wrapper is used for dependency injection in SwiftUI?

  • (A) @ObservedObject
  • (B) @State
  • (C) @EnvironmentObject
  • (D) @Binding
  • Correct Answer - Option(C)
  • Views: 1
  • Filed under category Swift (iOs)
  • Hashtags:

Explanation by: Admin
`@EnvironmentObject` injects shared data into a SwiftUI view from the environment.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.