繁体   English   中英

iOS如何捕获将标准键盘类型切换为数字键盘的事件?

[英]iOS how to catch event of switching standard keyboard type to number keypad?

切换到数字小键盘时,我想使用我的自定义数字小键盘。 如何实现此功能? 苹果没有为此提供任何API吗?

谢谢。

UITextInputMode类中有更改通知

UITextInputCurrentInputModeDidChangeNotification

因此添加此通知

[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(keyboardModeChange:) name:UITextInputCurrentInputModeDidChangeNotification object:nil];

我希望它对你有用。 快乐的编码:)

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM