How To Enable Text Input In Swift UITextField & UITextView When Run App In iOS Simulator

In my iOS app, I add a UITextField in the Main.storyboard file. When I run the app in the iOS simulator, I find I can not input text in the UITextField use my Mac book pro hardware keyboard. And I find the soft keyboard does not prompt in the iOS simulator when I focus on the input text box. Below is the method to fix this issue.

1. How To Enable Text Input Use Mac Book Pro Physical Keyboard In iOS Simulator.

  1. Focus on the iOS simulator and the UITextField object.
  2. Click Hardware —> Keyboard —> Connect Hardware Keyboard menu item at Simulator top menu bar. You should make sure the Connect Hardware Keyboard submenu item is checked.
  3. Now you can click the UITextField input text box to input text.

2. How To Fix Can Not Prompt Soft Keyboard In iOS Simulator.

  1. If you want to prompt the iOS simulator soft keyboard to input text.
  2. You should first check the Hardware —> Keyboard —> Connect Hardware Keyboard menu item.
  3. Then click the Hardware —> Keyboard —> Toggle Software Keyboard menu item. Then you can see the soft keyboard popup in the iOS simulator.

Leave a Comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.