ios - Backward with custom string -
I used string arrays for emoticons like this:
P> <<< <<> <<< << >> <<> <<< strong> Previous or Delete button, if the last word is in emoticons, then I The entire emoticon string should be removed, not the last one character Any thoughts? Try it out, NSArray * emoticons = Then display such a string in a UITextview:
NSString * string = self.textView. Text; __block NSString * deleteWord = Zero; __bloc NSRange Range Overworld; [String EnumettsstringsResources: NSMKernage (0, Self TextView.SlectedRange.Lichn + Self Textviewview.CallectedRangleLayment) Option: NSSSringNewationByWords | Using NSStringEnumerationBlock: ^ (NSString * substring, NSRange subrange, NSR enclosed range, BOOL * stop) {deleteWord = substring; Range forward = enclosed range; * Stop = yes; }]; If ([Objects included in emoticons: deleteWord]) {string = [string stringBeerPlaceholdingCountry: CategoryForm string with: @ ""]; Self.textView.text = string; Self.textView.selectedRange = NSMakeRange (rangeOfWord.location, 0); }
Comments
Post a Comment