title: How to remove focus from UITextField?
body: <p>I have seen this question asked million times everywhere, but there's no single answer that has been working for me.</p>
  
  <p>I need to remove focus from a UITextField. That means I need the cursor to go away (and the keyboard dismissed). </p>
  
  <p>The solution I've seen on the internet is either <code>[textfield resignFirstResponder]</code> or <code>[textfield endEditing:YES]</code>, which is able to hide the keyboard, but does not remove focus from UITextField (i.e. the cursor still blinking happily inside the UITextField, although the keyboard is dismissed).</p>
  
  <p>The thing with this is I need to get event when the user tap into the UITextField and the event didBeginEditing is fired. I'm doing something each time that event is fired, or more generally, each time the user tap on the UITextField. But if the focus isn't removed entirely from the UITextField, the event can't be fired again even after I called <code>resignFirstResponder</code> or <code>endEditing:YES</code>.</p>
  
  <p>How can I achieve this? Thanks.</p>