ios simulator: how to close an app

2019-01-12 17:33发布

问题:

When you "run" the simulator from xCode, the app automatically launches, and then you can click the home button to suspend the app. What I want to do is close the app from within the simulator. So, how can this be done?

回答1:

You can also do it with the keyboard shortcut shown under the simulator menu bar (Hardware-> Home).

The shortcut is ++H, but you need to hit H twice in a row for it to simulate the double press that shows the apps.



回答2:

For iOS 7 & above:

  • shift+command+H twice to simulate the double tap of home button
  • swipe your app's screenshot upward to close it

You'll see screenshots representing the apps suspended on your device - those screenshots respond to touch events. Swiping is the gesture you'll make to "fling" the screenshot off of the screen. Note that on machines where your mouse is intended to represent your finger, you'll click and swipe as if it is your finger tapping and making the gesture.



回答3:

On the new iPhone X, the simulator was having issues with the mouse/finger gesture.

You can do a long press with the mouse and a close icon will appear. You can use the swipe up gesture as well to close the app.



回答4:

I had a difficult time in finding a way in XCode 7.2, but finally I had found one. First press Shift+Command+ H twice. This will open up all the apps that are currently open.

Swipe left/right to the app you actually want to close. Just Swipe Up using the Touchpad while Holding the App would close the app.



回答5:

For closing (not quit) the running application in Simulator the keyboard shortcut is "shift+command+h".



回答6:

Double click on the home button and then click and hold the icon like a normal phone and then click close I believe.



回答7:

Window / Show Device Bezels

And now you can see the real device, so double tap on HOME button and kill you app



回答8:

To close the simulator in OS X, Just press Command+Q.

Hope it helps.