How to remove the grey bottom bar in iPad simulator

喜夏-厌秋 提交于 2019-12-10 15:34:23

问题


I have tried to reset the simulator, to change the keyboard input settings, to rotate the simulator, but it did not change anything.

The grey bar covers my ui so that the simulator is not usable.

XCode version: 7.1 (7B91b) Simulator version: 9.1 (SimulatorApp-635.5)


回答1:


To hide this bar you need to go into the Settings.app within the simulator (tap the gears icon on the home screen), then General->Keyboard, and turn off the 'Shortcuts' toggle.

I have this issue in my app constantly, and cannot for the life of me figure out why the bar is showing in the first place. The firstResponder idea mentioned by James seems like a sensible place to start looking, but bizarrely this is appearing on every screen, no matter if it has a text field in it or not. Perhaps it is an Apple bug after all.

Handy hint... if you are looking for a way to set the Shortcuts keyboard option from the command line (eg. when doing https://github.com/fastlane/snapshot), the following command does the trick:

find ~/Library/Developer/CoreSimulator/Devices -path */data/Library/Preferences/com.apple.Preferences.plist | xargs -n 1 -I {} defaults write "{}" KeyboardAssistant -bool NO

(it finds all the Settings.app plists for all simulators and writes NO into the KeyboardAssistant key)




回答2:


The grey bar is the shortcut bar that shows when the iPad is connected to an external keyboard. It should show when a text field has the first responder edit focus.

When you are in the simulator, you can simulate this and have the software keyboard not show.

When I am in the simulator, there is a "V" control on the far right that dismisses the bar.

Try scrolling to the right with two fingers to find this control. You may also need to use a 50% or smaller scale in Window->Scale to see more of your interface.

Also try toggling the software keyboard with command K or in the menu at Hardware -> Keyboard.

If you are not seeing it, you have some Simulator bug that I have not seen.

For what it is worth, remember that you need to adapt to the much bigger software keyboard appearing and disappearing in you interface as text entry fields get to be the firstResponder. Search StackOverflow or Apple docs for the many ways of moving controls out of the way so you can see them.




回答3:


Here is a supplemental image. I didn't understand at first what was being described in Loz's answer.



来源:https://stackoverflow.com/questions/33480463/how-to-remove-the-grey-bottom-bar-in-ipad-simulator

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