When you run your app, Xcode installs it on the iOS Simulator (or on a real iPad if you specified the device as the active SDK) and launches it.
Using the Hardware menu and your keyboard and mouse, the Simulator mimics most of what a user can do on a real iPad.
You use the Simulator's Hardware menu when you want the Simulator to simulate the following:
- Rotate left: Choosing Hardware → Rotate Left rotates the Simulator to the left. If the Simulator is in portrait view, it changes to landscape view; if the Simulator is already in landscape view, it changes to portrait view.
- Rotate right: Choosing Hardware → Rotate Right rotates the Simulator to the right, with the same effect as choosing Hardware → Rotate Left.
- Use a shake gesture: Choosing Hardware → Shake Gesture simulates shaking the iPad.
- Go to the Home screen: Choosing Hardware → Home does the expected - you go to the Home screen.
- Lock the Simulator (device): Choosing Hardware → Lock locks the Simulator.
- Send the running app low-memory warnings: Choosing Hardware → Simulate Memory Warning fakes out your app by sending it a (fake) low-memory warning. It's a great feature for seeing how your app may function out there in the real world.
- Toggle the status bar between its Normal state and its In Call state: Choose Hardware → Toggle In-Call Status Bar to check out how your app functions when the device is not answering a call (Normal state) and when it supposedly is answering a call (In Call state) - these choices apply only to the iPhone as of this writing.
- Simulate the hardware keyboard: Choose Hardware → Simulate Hardware Keyboard to check out how your app functions when the iPad is connected to the optional physical keyboard dock.
- TV Out: To bring up another window that acts like an external display attached to the device, choose Hardware → TV Out, and then choose 640x480, 1024x768, or 1280x720 for the window's display resolution. Choose Hardware → TV Out → Disabled to close the external display window.
On the real device, a gesture is something you do with your fingers to make something happen in the device, like a tap, a drag, and so on. Table below shows you how to simulate gestures using your mouse and keyboard.Gestures in the Simulator
|Tap||Click the mouse.|
|Touch and hold||Hold down the mouse button.|
|Double tap||Double-click the mouse.|