Not able to type in textfield in iphone simulator

2019-01-31 11:02发布

I am working on a basic application which is working in portrait as well as in landscape mode. When the iPhone simulator keyboard is open in landscape and I am switching the app to portrait mode I am not able to type anything in a text field using my Mac keyboard.

Has anyone experienced this before? Is it a known bug?

26条回答
爷的心禁止访问
2楼-- · 2019-01-31 11:19

None of these suggestions worked for me. I closed the iOS Simulator app and restarted it. That fixed it for me.

查看更多
爱情/是我丢掉的垃圾
3楼-- · 2019-01-31 11:21

In Xcode 9 I faced the same problem with iPhone 8 Plus simulator. It was solved this way:

  1. Open ~/Library/Preferences/com.apple.iphonesimulator.plist
  2. Set value for CaptureKeyboardInput to YES
  3. Restart Simulator.

enter image description here

查看更多
神经病院院长
4楼-- · 2019-01-31 11:21

On the Simulator try to change the device. Then run your app again on the original device. That worked for me.

If the first step alone doesn't work uncheck the option: iOS Uses same keyboard layout as OS X and then change the device.

I figured it out doing random stuff until it worked. Monkey fixing.

查看更多
相关推荐>>
5楼-- · 2019-01-31 11:23

I have just installed a new version of Xcode (5.0) and the keyboard in iOS Simulator didn't work on first launch. Just restarting the Simulator helped.

查看更多
地球回转人心会变
6楼-- · 2019-01-31 11:23

i think it is only because of a problem that you did not selected 'connect hardware keyboard option, on the simulator menu bar named 'Hardware'

Please follow the steps

Goto : Hardware -> Keyboard -> Connect Hardware Keyboard

Hope it will help you with the problem , Thank you.enter image description here

查看更多
Root(大扎)
7楼-- · 2019-01-31 11:24

Found a great solution that worked for me.
Open simulator, then find menu Hardware -> Keyboard has three options:

  1. iOS uses same layout as OS X : This option disables the Mac keyboard
  2. Connect Hardware Keyboard : This option enables Mac keyboard but the keyboard will not show up.
  3. Toggle Software keyboard : This option will allow you type using your Mac keypad and will show the iOS on screen keyboard as well.
查看更多
登录 后发表回答