Suppose, I have a string in a UITextView that is :
NSString *str = @"Hello world. What @are you @doing ?"
When I tap on the text, I can delete the character by character. But what I want is if any word starts with @
(like: @are) then when I tap on that word and press backspace the entire word (i.e, @are)should be deleted instead of a character. Is it possible that when I tap on any word that has a prefix '@' (like: @are) it will be highlighted and press backspace will delete that word ?
How can I do that?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…