Emoji Keyboard for iOS

Overview

logo Version Carthage Compatible License Platform Swift

English | 中文

An easy to use Emoji keyboard for iOS.

Has been rewritten with swift, the old Objective-C version on branch oc.

Features

  • Written in Swift
  • Custom emojis
  • Multiple skin tone support ( 🏻 🏼 🏽 🏾 🏿 )
  • Categories bottom bar (like iOS system emoji Keyboard)
  • Recently used emoji
  • Dark Mode (#58)

Example

To run the example project, clone the repo, and run pod install from the Example directory first.

Requirements

  • Swift 5
  • iOS8+
  • Xcode 10

Useage

Installation

Cocoapods

# Swift
pod 'ISEmojiView'

# Objective-C (Deprecated)
pod 'ISEmojiView', '0.0.1'

Carthage

github "isaced/ISEmojiView"

Import

import ISEmojiView

Initialization

let keyboardSettings = KeyboardSettings(bottomType: .categories)
let emojiView = EmojiView(keyboardSettings: keyboardSettings)
emojiView.translatesAutoresizingMaskIntoConstraints = false
emojiView.delegate = self
textView.inputView = emojiView

Delegate

Implement <EmojiViewDelegate>

// callback when tap a emoji on keyboard
func emojiViewDidSelectEmoji(_ emoji: String, emojiView: EmojiView) {
    textView.insertText(emoji)
}

// callback when tap change keyboard button on keyboard
func emojiViewDidPressChangeKeyboardButton(_ emojiView: EmojiView) {
    textView.inputView = nil
    textView.keyboardType = .default
    textView.reloadInputViews()
}
    
// callback when tap delete button on keyboard
func emojiViewDidPressDeleteBackwardButton(_ emojiView: EmojiView) {
    textView.deleteBackward()
}

// callback when tap dismiss button on keyboard
func emojiViewDidPressDismissKeyboardButton(_ emojiView: EmojiView) {
    textView.resignFirstResponder()
}

Customize

KeyboardSettings

This is a class to desribe keyboard settings. Available properties:

  • bottomType - type of bottom view. Available variants: .pageControl, .categories. See BottomType enum. Default .pageControl.
  • customEmojis - array of custom emojis. To describe emojis you have to use EmojiCategory class.
  • isShowPopPreview - long press to pop preview effect like iOS10 system emoji keyboard. Default is true.
  • countOfRecentsEmojis - the max number of recent emojis, if set 0, nothing will be shown. Default is 50.
  • needToShowAbcButton - need to show change keyboard button. This button is located in Categories bottom view.

Others

If you are looking for a React Native solution, take a look at this brendan-rius/react-native-emoji-keyboard

License

MIT

Comments
  • Few methodes and properties are not working

    Few methodes and properties are not working

    Nice example but following delegate not working and properties

    1. needToShowAbcButton

    When set categories keyboard // callback when tap delete button on keyboard func emojiViewDidPressDeleteButton(emojiView: EmojiView) { txtView.deleteBackward() }

    // callback when tap dismiss button on keyboard
    func emojiViewDidPressDismissKeyboardButton(_ emojiView: EmojiView) {
        txtView.resignFirstResponder()
    } type
    

    And when set Page Controller Type that time following delegate not working

    // callback when tap delete button on keyboard func emojiViewDidPressDeleteButton(emojiView: EmojiView) { txtView.deleteBackward() }

    opened by pratikmi 13
  • Support Dark Keyboard on iOS 13 when Dark Mode is enabled

    Support Dark Keyboard on iOS 13 when Dark Mode is enabled

    Keyboard has white background on iOS 13 when in dark mode.

    For reference, if this helps speed up implementation:

            if #available(iOS 13, *) {
                if (vc.traitCollection.userInterfaceStyle == .dark) {
                    // Make keyboard background dark.
                }
            }
    
    opened by thejeff77 9
  • Cannot click button on text input bar when emojiView is visible.

    Cannot click button on text input bar when emojiView is visible.

    Hi, i am creating a chat VC and it has an input text bar includes a send button and a textview with inputView is ISEmojiView. The problem is when EmojiView is visible, the emoji button and send button is notclickable. Can you help me? Thanks. image

    opened by junestchick 8
  • Updated Emojis? Recent Emojis?

    Updated Emojis? Recent Emojis?

    Hi! ISEmojiView has been great! Is there any way you could update the emojis? iOS came out with a lot of new emojis and it would be super if you could include those as well.

    Also is there anyway to see the recent emojis in the first screen?

    opened by JCsplash 8
  • Please Update this who can i open emojiKeyboard through a button click

    Please Update this who can i open emojiKeyboard through a button click

    Please Update this how can i open emojiKeyboard through a button click

    Originally posted by @ProKashif in https://github.com/isaced/ISEmojiView/issues/52#issuecomment-557059498

    opened by ProKashif 3
  • Doesn't build in XCode 12 Swift 5.3

    Doesn't build in XCode 12 Swift 5.3

    Anyone else getting this? ... the last line of the log is ** BUILD SUCCEEDED **

    ******* Error *********

    carthage update --platform iOS

    *** Building scheme "ISEmojiView" in ISEmojiView.xcodeproj Build Failed Task failed with exit code 1: /usr/bin/xcrun lipo -create /var/root/Library/Caches/org.carthage.CarthageKit/DerivedData/12.0_12A7209/ISEmojiView/0.2.6/Build/Intermediates.noindex/ArchiveIntermediates/ISEmojiView/IntermediateBuildFilesPath/UninstalledProducts/iphoneos/ISEmojiView.framework/ISEmojiView /var/root/Library/Caches/org.carthage.CarthageKit/DerivedData/12.0_12A7209/ISEmojiView/0.2.6/Build/Products/Release-iphonesimulator/ISEmojiView.framework/ISEmojiView -output /Users/userreportingissuenow/Projects/practicePlayer/Carthage/Build/iOS/ISEmojiView.framework/ISEmojiView

    This usually indicates that project itself failed to compile. Please check the xcodebuild log for more details: /var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/carthage-xcodebuild.jNHiqP.log

    opened by thejeff77 2
  • How to open Emoji Keyboard on button?

    How to open Emoji Keyboard on button?

    Hello, First of all, great repository. Currently, I am working on chat application and in which I am using emoji keyboard but I have to open emoji keyboard on button click like WhatsApp rather than text view click. how can I achieve that?

    question 
    opened by NikhilGangurde 2
  • Skin Tone emojis don't work when selected from the

    Skin Tone emojis don't work when selected from the "recently used" section

    Steps to re-create:

    • Launch the emoji keyboard and select a skin tone emoji
    • Re-open the keyboard, the skin tone emoji should now be in the recently used section
    • Select the skin tone emoji from the recently used section

    Expected results: The skin tone emoji to appear after being selected from recently used.

    Actual results: The default yellow version of that emoji appears when the skin tone emoji has been selected.

    bug 
    opened by danobrown 2
  • Apple emoji keyboard

    Apple emoji keyboard

    Hi. In this PR I did:

    1. A lot of refactoring
    2. Implemented emoji categories bottom bar like in apple emoji keyboard
    3. Implemented recent emojis

    Also, I changed a bit the structure of ISEmojiList.plist. Now it looks like apple emoji keyboard.

    If you are going to apply this PR, please change screenshot links in README.md, because currently, links see to my repository.

    opened by Beniamiiin 2
  • Link to React Native version

    Link to React Native version

    I developed a React Native wrapper around this library (because doing this on the JS side is slow). Are you interested in mentioning it in your README?

    Here is the link : https://github.com/brendan-rius/react-native-emoji-keyboard

    opened by brendan-rius 2
  • Carthage issue

    Carthage issue

    Hello,

    I have some trouble with Carthage and ISEmojiView, got this error Module file's minimum deployment target is ios10.1 v10.1, any idea to fix it ? :)

    Thank you

    opened by floriangbh 2
  • [Emoji Spider] Updating Emoji from Emojipedia

    [Emoji Spider] Updating Emoji from Emojipedia

    opened by isaced 0
  • Delete button does not appear

    Delete button does not appear

    Using version 0.3.3 (SPM).
    The delete button is missing from the category view.

    let keyboardSettings = KeyboardSettings(bottomType: .categories)
    keyboardSettings.isShowPopPreview = true
    keyboardSettings.needToShowAbcButton = false
    keyboardSettings.needToShowDeleteButton = true
    keyboardSettings.updateRecentEmojiImmediately = true
    

    The delete button does not appear.
    Using the pageControl bottom type and a delete button results in a crash.

    opened by moshegottlieb 1
  • New Emojis iOS 15.4+

    New Emojis iOS 15.4+

    opened by isaced 6
  • Am trying to show emojikeyboard with custom categories

    Am trying to show emojikeyboard with custom categories

    Am trying to show emojikeyboard with custom categories this way below by calling func on tap of a button, but below code always opens usual keyboard with all default emojis with categories, any help will be much appreciated

    func showEmojiKeyBoard() {
            emojiKeyboard?.delegate = self
    
            let keyboardSettings = KeyboardSettings(bottomType: .categories)
            emojiKeyboard = EmojiView(keyboardSettings: keyboardSettings)
            if let settingsURL = Bundle.main.path(forResource: "EmojisInCategories", ofType: "plist") {
                           do {
                               var emojiArray: EmojisInCategory?
                               let data = try Data(contentsOf: URL(fileURLWithPath: settingsURL))
                                   let decoder = PropertyListDecoder()
                               emojiArray = try decoder.decode(EmojisInCategory.self, from: data)
                keyboardSettings.customEmojis = [
                    EmojiCategory(
                        category: Category.custom("My Title", "customCategory"),
                        emojis: [Emoji(emojis: (emojiArray?.Activity)!), Emoji(emojis: ["🤣"])]
                    )
                ]
            
                            
            } catch {
                    print(error)
                }
            }
            keyboardSettings.countOfRecentsEmojis = 20
            keyboardSettings.updateRecentEmojiImmediately = true
        DispatchQueue.main.asyncAfter(deadline: .now() + 0.03) {
    
    
                self.view.addSubview((self.emojiKeyboard!));
                self.emojiKeyboard?.addConstaintsToBottomofSuperview(leftOffset: 0, rightOffset: 0, bottomOffset: 0)
    
            }
    }
    
    opened by Gouthamansriniv 0
  • Emoji keyboard tap confirmation

    Emoji keyboard tap confirmation

    When typing on the emoji keyboard, there is no visual confirmation that the emoji tapped was successfully selected. Please refer attached gif image, I need to implement exactly like this

    Emoji Keyboard Confirmation

    opened by cmdr-surender-singh 0
Releases(0.3.3)
Owner
isaced
iOS Developer, Ruby/Crystal fans.
isaced
iOS utility class allows you to access keyboard view and track keyboard animation.

YYKeyboardManager iOS utility class allows you to access keyboard view and track keyboard animation. (It was used by YYText) Compatibility iPhone / iP

null 480 Nov 17, 2022
Codeless manager to hide keyboard by tapping on views for iOS written in Swift

KeyboardHideManager KeyboardHideManager - codeless manager to hide keyboard by tapping on views for iOS written in Swift. Structure Features Requireme

Bondar Yaroslav 55 Oct 19, 2022
Swift UIKit keyboard manager for iOS apps.

Typist Typist is a small, drop-in Swift UIKit keyboard manager for iOS apps. It helps you manage keyboard's screen presence and behavior without notif

Toto Tvalavadze 1.1k Dec 10, 2022
KeyboardKit is a Swift library that helps you create custom keyboard extensions for iOS and ipadOS.

KeyboardKit is a Swift library that helps you create custom keyboard extensions for iOS and ipadOS.

KeyboardKit 900 Jan 9, 2023
Best way to dismiss Keyboard in a View Controller iOS (Swift)

Best way to dismiss Keyboard in a View Controller iOS (Swift) First way: Implement UITextFieldDelegate’s textFieldShouldReturn method and dismiss curr

null 0 Dec 18, 2021
Objective-C library for tracking keyboard in iOS apps.

NgKeyboardTracker Objective-c library for tracking keyboard in iOS apps. Adding to your project If you are using CocoaPods, add to your Podfile: pod '

Meiwin Fu 808 Nov 17, 2022
A drop-in universal solution for moving text fields out of the way of the keyboard in iOS

TPKeyboardAvoiding A drop-in universal solution for moving text fields out of the way of the keyboard in iOS. Introduction There are a hundred and one

Michael Tyson 5.8k Dec 26, 2022
A Chinese keyboard for iOS that helps Chinese language learners remember tones.

ToneBoard ToneBoard is a Chinese keyboard for iOS that requires you to enter the correct tones while typing simplified Chinese with Pinyin. It is avai

Kevin Bell 7 Sep 27, 2022
SwiftyKeyboard: a full customized numeric keyboard for iOS

SwiftyKeyboard Overview SwiftyKeyboard is an iOS customized enhanced keyboard. T

SwiftyKit 2 Jun 30, 2022
Slidden is an open source, customizable, iOS 8 keyboard, written in Swift

Slidden is an open source, customizable, iOS 8 keyboard, written in Swift. iOS 8 brought us the ability to create fully customizable keyboards, but do

Daniel Brim 595 Jan 5, 2023
IHKeyboardAvoiding is an elegant solution for keeping any UIView visible when the keyboard is being shown - no UIScrollView required!

IHKeyboardAvoiding An elegant solution for keeping any UIView visible when the keyboard is being shown Requirements IHKeyboardAvoiding Version Objecti

Idle Hands Apps 1.4k Dec 14, 2022
Codeless drop-in universal library allows to prevent issues of keyboard sliding up and cover UITextField/UITextView. Neither need to write any code nor any setup required and much more.

IQKeyboardManager While developing iOS apps, we often run into issues where the iPhone keyboard slides up and covers the UITextField/UITextView. IQKey

Mohd Iftekhar Qurashi 15.9k Jan 8, 2023
⌨️ Add user-customizable global keyboard shortcuts to your macOS app in minutes

This package lets you add support for user-customizable global keyboard shortcuts to your macOS app in minutes. It's fully sandbox and Mac App Store c

Sindre Sorhus 1.1k Dec 29, 2022
Suppress mouse & keyboard events on MacOSX. Baby-proof my Mac!

Suppress mouse & keyboard events on MacOSX Catches all events (mouse, keyboard, everything), and either consumes them (locked state) or passes them th

Albert Zeyer 6 Oct 21, 2022
QMK Agent is a macOS menubar application which sends commands to a QMK enabled keyboard

QMKagent QMK Agent is a macOS menubar application which sends commands to a QMK enabled keyboard Features System volume indicator using top row (Esc t

Mike Killewald 4 Apr 24, 2022
Showing / dismissing keyboard animation in simple UIViewController category.

RSKKeyboardAnimationObserver Easy way to handle iOS keyboard showing/dismissing. Introduction Working with iOS keyboard demands a lot of duplicated co

Ruslan Skorb 45 Jun 9, 2022
A simple keyboard to use with numbers and, optionally, a decimal point.

MMNumberKeyboard A simple keyboard to use with numbers and, optionally, a decimal point. Installation From CocoaPods CocoaPods is a dependency manager

Matías Martínez 957 Nov 17, 2022
For less complicated keyboard event handling.

KeyboardObserver For less complicated keyboard event handling. Features Less complicated keyboard event handling. Do not use Notification , but event

Morita Naoki 163 May 24, 2022
KeyboardMan helps you to make keyboard animation.

KeyboardMan We may need keyboard infomation from keyboard notifications to do animation. However, the approach is complicated and easy to make mistake

null 353 Apr 19, 2022