-2

I subscribed to a service call and handling error incase if service call throws an error. This is everything done in View Model. So, when an error throws I want to dismiss Keyboard. How can I let my View Model tells to VC to dismiss keyboard. I am using reactive cocoa and swift.

coolly
  • 343
  • 1
  • 6
  • 16

1 Answers1

3

You can dismiss the keyboard with the following method: view.endEditing(true)

Bacon
  • 792
  • 5
  • 8