Hi Deni Zakya, in EmailViewModel there are 2 properties declared with objc dynamic keywords:

  • emailTextValue
  • isValidValue

Those properties are being observed by the ViewController using the keypath in the observeViewModel method to update the emailLabel and emailValidationLabel with the initial value and subsequent change using a closure completion handler.

Mobile Developer and Lifelong Learner. Currently building super app @ Go-Jek. Xcoding with Alfian at https://alfianlosari.com

Mobile Developer and Lifelong Learner. Currently building super app @ Go-Jek. Xcoding with Alfian at https://alfianlosari.com