A

Admin • 670.22K Points
Coach

Q. What does `@Published` do in Swift?

  • (A) Creates an optional
  • (B) Allows observing changes in a property
  • (C) Marks a method for publication
  • (D) Creates a static value
  • Correct Answer - Option(B)
  • Views: 1
  • Filed under category Swift (iOs)
  • Hashtags:

Explanation by: Admin
`@Published` is used in ObservableObject to notify views when a property changes.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.