I am limiting the input in a UITextField to only characters from the alphabet like this in shouldChangeCharactersIn
:
switch textField {
case descriptionTextField:
return prospectiveText.containsOnlyCharactersIn(matchCharacters: "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZáäâàæãåāéëêèęėēóôòõœøōúüûùūíïìîįīÁÄÂÀÆÃÅĀÓÖÔÒÕŒØŌÚÜÛÙŪÍÏÌÎĮĪ ") && prospectiveText.count <= 51
default:
return true
}
Now while this works like a charm, I want to allow users to insert emoji as well. Is there any way I can accomplish this? I don't want them to insert numbers or special characters though.