Adding support for UITextField (shouldChangeCharactersInRange:) and UITextView (shouldChangeTextInRange:) delegate methods.