Not able to type in textfield in iphone simulator using Mac Keyboard?

前端 未结 30 917
小蘑菇
小蘑菇 2020-12-23 15:47

I\'m working on a basic iOS app which supports both portrait and landscape modes. When the iPhone simulator keyboard is open in landscape and I\'m switching the app

相关标签:
30条回答
  • 2020-12-23 16:06

    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.
    0 讨论(0)
  • 2020-12-23 16:08

    I just tried what you just said and it's true, it doesn't work if I move it to landscape and then to portrait again. It doesn't have any logic because my app is not even changing, and it works fine in the device, so it's a bug in the simulator.

    You can report it to Apple using this:

    https://developer.apple.com/bug-reporting/

    0 讨论(0)
  • 2020-12-23 16:08

    XCode 12: In the simulator window, from the top pane, I/O>Input>Send Keyboard Input to Device

    or alt-command-k

    0 讨论(0)
  • 2020-12-23 16:09

    CMD + SHIFT + K

    I have pressed this command 2 times to toggle and then it started working

    0 讨论(0)
  • 2020-12-23 16:10

    Before you start typing (when the on-screen keyboard shows up), press just the command key by itself and then release it. This should re-enable the keyboard in the simulator.

    0 讨论(0)
  • 2020-12-23 16:12

    The solution that really work for me, was deleted the simulator and create new one. This bug I think that commonly occur when all shortcuts does not work from your keyboard to simulator.

    0 讨论(0)
提交回复
热议问题