iOS - 动态显示自定义键盘?
我为 iPad 应用程序推出了自己的键盘视图,模仿标准对接键盘的尺寸。我注意到,如果用户上次使用拆分键盘,它会尝试在拆分键盘的位置和尺寸处显示我的自定义视图,但结果并不理想。因此,我创建了视图的拆分键盘版本,并希望动态显示标准或拆分版本。
然而,问题是及时设置 textField 的 inputView - 我可以检查键盘属性的最快时间是来自 UIKeyboardWillChangeFrame 或 UIKeyboardWillShow 通知 - 然而,这已经太晚了,因为键盘视图似乎已经加载。
I've rolled my own keyboard view for an ipad app, mimicking the dimensions of the standard docked keyboard. I noticed that if the user last used a split keyboard, it tries to display my custom view at the position and dimensions of the split keyboard, with suboptimal results. So, I've created a split keyboard version of the view, and would like to display the standard or split version dynamically.
The issue, however is setting the textField's inputView in time - the soonest it seems I can examine the keyboard's properties is from a UIKeyboardWillChangeFrame or UIKeyboardWillShow notification - however, this is too late as the keyboard view already seems to have been loaded.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论