我正在使用swift进行编码,当用户长按该角色时,我想在iOS设备上禁用重音键盘。
我不想在“设置”中按照代码执行此操作。
我不知道之前是否讨论过这个话题。
谢谢
更新
我在ShouldChangeCharacterInRange方法中有流动的代码
public func textField(textField: UITextField, shouldChangeCharactersInRange range: NSRange, replacementString string: String) -> Bool
{
let xField = fieldBy(textField.tag)!
let editedString = textField.text!.replace(range, with: string)
let isLengthValid = !xField.isBeyondLimit(editedString)
if isLengthValid {
xField.validate(editedString)
}
return isLengthValid
}