title: deleteBackward not getting called for custom UITextfield
body: <p>I want to develop passcode like functionality in my app.For that i am  using textfields.Entering passocode is done successfully.Now i want to implement clear passcode text entered on back button action of numberpad.
      Here is my code snippet of declaring protocol   </p>
  
  <pre><code>@objc protocol BackPressDelegate {
  
  func backPressed(info: NSDictionary)
  }
  
  class CustomTextField: UITextField, UIKeyInput {
  
  var del1:BackPressDelegate?
  
  override func deleteBackward() {
  
          super.deleteBackward()
  
          if ((self.delegate?.respondsToSelector("backPressed")) != nil) {
  
              self.del1?.backPressed(["tag":self.tag])
          }
      }
  }
  </code></pre>
  
  <p>For doing this, i have created subclass of uitextfield in which i have
  override      'deleteBackward()' method.i have also set delegate of
  uitextfield in storyboard . My problem with this is deleteBackward is
  not getting called due to some reason when i press back button on
  numberpad.</p>