开发者

How to implement the display and edit for some custom icons such as ":)", ":("?

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"];
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜