rsattar / CLTokenInputView

A replica of iOS's native contact bubbles UI
MIT License
504 stars 127 forks source link

Backspace in a token Deletes two characters #27

Closed momin96 closed 8 years ago

momin96 commented 8 years ago

Pressing backspace will deletes two characters at same time. I using it as single & multiple tokens, and as normal textField and all are separate instances for my usecase. I am working for iOS 8 and above.

Thank You.

momin96 commented 8 years ago

I guess I was missing ![textField.text length] in -keyboardInputShouldDelete: which causes the above problem. I wonder this line of code is not needed for me, as I m on 8.4 and above.

if (![textField.text length] && [[[UIDevice currentDevice] systemVersion] intValue] >= 8) {
       [self deleteBackward];
  }

btw Happy Coding