keyboard in UIActionSheet does not type anything

守給你的承諾、 提交于 2019-11-30 10:58:16
SVD

One weird thing about action sheets is that, for example, if there's a tab bar present, the tab bar may "steal" some of the action sheets taps, even though visually the action sheet is on top.

Your action sheet is 380 pixels high - so when the keyboard slides out it overlaps with the action sheet. Perhaps in this case it is the action sheet stealing the keyboard's taps? Try making the action sheet smaller and closer to the top - e.g. to test the idea I'd just make it originate at 0,0, and 240 pixels high.

Edit:

Apparently it is a problem - it doesn't work for me either in a simple test application, without tab bar or tool bar. I've found these links though:

Doing this with an alert view and it seems to work (although it seems like it only works for alert views): https://discussions.apple.com/thread/1674641

And here someone making their own "action sheet" instead: how to enable text input in UITextField which is in UIActionSheet?

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!