ISEmojiView/README.md

1.5 KiB

ISEmojiView CocoaPods Platform GitHub license

An easy to use Emoji keyboard for iOS.

screenshot

Install

CocoaPods

pod 'ISEmojiView'

Useage

Init

// init ISEmojiView
ISEmojiView *emojiView = [[ISEmojiView alloc] initWithTextField:textView delegate:self];
textView.inputView = emojiView;

Response

add protocol ISEmojiViewDelegate and implementation emojiView:didSelectEmoji: method

-(void)emojiView:(ISEmojiView *)emojiView didSelectEmoji:(NSString *)emoji{
    self.textView.text = [self.textView.text stringByAppendingString:emoji];
}

and emojiView:didPressDeleteButton: method:

-(void)emojiView:(ISEmojiView *)emojiView didPressDeleteButton:(UIButton *)deletebutton{
    if (self.textView.text.length > 0) {
        NSRange lastRange = [self.textView.text rangeOfComposedCharacterSequenceAtIndex:self.textView.text.length-1];
        self.textView.text = [self.textView.text substringToIndex:lastRange.location];
    }
}

Other

  • popAnimationEnable to enable animation when tap a emoji

License

MIT