A

Admin • 670.22K Points
Coach

Q. What is the purpose of the `didSet` observer in Swift?

  • (A) To observe a property before it's set
  • (B) To call a function when a class is initialized
  • (C) To run code after a property’s value is changed
  • (D) To override a property
  • Correct Answer - Option(C)
  • Views: 1
  • Filed under category Swift (iOs)
  • Hashtags:

Explanation by: Admin
`didSet` runs code after a property's value has been changed.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.