gpt4 book ai didi

ios - iOS 中的 UIKeyboard 字母单击操作

转载 作者:可可西里 更新时间:2023-11-01 02:18:18 26 4
gpt4 key购买 nike

我想在 iOS 应用程序中获取 UIKeyboard 的每个字母点击操作,有可能吗?

例如:

 func textFieldShouldReturn(textField: UITextField) -> Bool {
...
}

但是在其他按钮上..没有创建自定义键盘

最佳答案

func textField(textField: UITextField!, shouldChangeCharactersInRange range: NSRange, replacementString string: String!) -> Bool {
//you can check here which key has pressed in parameter 'string'
return true
}

关于ios - iOS 中的 UIKeyboard 字母单击操作,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34351480/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com