Skip to content

Instantly share code, notes, and snippets.

@thornpig
Created February 8, 2016 19:05
Show Gist options
  • Save thornpig/69d431f76eb1b0dfc063 to your computer and use it in GitHub Desktop.
Save thornpig/69d431f76eb1b0dfc063 to your computer and use it in GitHub Desktop.
Detect pressing backspace in textview
-(BOOL)textView:(UITextView *)textView shouldChangeTextInRange:(NSRange)range replacementText:(NSString *)text
{
if (text.length == 0 && range.length == 1)
{
//backspace is pressed
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment