/JKEmojiField

UITextField subclass with emoji text constraint

Primary LanguageSwiftMIT LicenseMIT

JKEmojiField

A UITextField subclass that imposes emoji input mode restriction on the keyboard and text entry.

Version License Platform Downloads

Usage

Create a JKEmojiField just like you would create a regular UITextField.

Swift

let emojiField = JKEmojiField(frame: frameRect)
emojiField.shouldResignAfterOneChar = true //Force field to contain only one emoji
emojiField.emojiDelegate = self

Objective-C

JKEmojiField *emojiField = [[JKEmojiField alloc] initWithFrame:frameRect];
emojiField.shouldResignAfterOneChar = true; //Force field to contain only one emoji
emojiField.emojiDelegate = self;

Installing

CocoaPods

Include the following in your podfile

pod 'JKEmojiField'

Manual

Add the JKEmojiField.swift file to your project

Authors

License

This project is licensed under the MIT License - see the LICENSE file for details