Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am jnjosh on github.
  • I am jnjosh (https://keybase.io/jnjosh) on keybase.
  • I have a public key ASBonVU4HBox2F61fNe_kewxSiugPmfAUV_2kG0BeBkKfQo

To claim this, I am signing this object:

@jnjosh
jnjosh / EmojiTextField.swift
Created June 9, 2023 21:42
Quick UITextField » SwiftUI wrapper for textfield that forces emoji keyboard
import SwiftUI
// UIKit-based text field that forces emoji keyboard as input mode.
class UIEmojiTextField : UITextField {
override var textInputMode: UITextInputMode? {
return UITextInputMode.activeInputModes
.filter { $0.primaryLanguage == "emoji" }
.first
}
}