Shut down iPhone in simulator
Yes. Press Command
+Q
to quit the simulator.
This will close all the apps running in the simulator.
Pressing the home button
only returns to the home screen without quitting the apps(ios 4 or later) because of multitasking.
You can also double tap the home button, click and hold on the icons at the bottom of the screen till a red circle appear, and click on the red circle to close the running app.
If your'e xcode 9.You can now shutdown the simulator by long-pressing the power button.
As of XCode 9, the best way to close a single simulator is using the Cmd + W shortcut, or going to File -> Close Window.