Is there any option to stop showing the emoji keyboard in iOS 8? It is not available in numpad and secure text but for email it is there. If it is not possible to disable i
You can try this (Swift 5).
Create String extension:
extension String {
func containsEmoji() -> Bool {
for scalar in unicodeScalars {
if !scalar.properties.isEmoji { continue }
return true
}
return false
}
}
Then use it in UITextFieldDelegate like this:
func textField(_ textField: UITextField, shouldChangeCharactersIn range: NSRange, replacementString string: String) -> Bool {
if string.containsEmoji() { return false }
return true
}