I want to implement the input and display for some custom icons such as ":)", ":(", "@name", etc by UITextField. Maybe I can hook up the action of valueChanged for the text field to a method which scans the text. But how can I put a imageView in 开发者_StackOverflow中文版UITextField? Even if the icon is set as a subview of UITextField, how can I edit this icon(shift or remove)?
You could replace the :)
with an emoji smile: http://pukupi.com/post/1964
Like this?
NSString *emo;
UIImage *smile;
if ( [emo compare:@":)" options:NSCaseInsensitiveSearch] == NSOrderedSame )
smile = [UIImage imageNamed:@"smile.png"];
精彩评论