Home / iPad

The Simulator

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.

Hardware interaction

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.

Gestures

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
GestureiPad Action
TapClick the mouse.
Touch and holdHold down the mouse button.
Double tapDouble-click the mouse.
Two-finger tap
  1. Move the mouse pointer over the place where you want to start.
  2. Hold down the Option key, which makes two circles appear that stand in for your fingers.
  3. Press the mouse button.
Swipe
  1. Click where you want to start and hold the mouse button down.
  2. Move the mouse slowly in the direction of the swipe and then release the mouse button.
Flick
  1. Click where you want to start and hold the mouse button down.
  2. Move the mouse quickly in the direction of the flick and then release the mouse button.
Drag
  1. Click where you want to start and hold the mouse button down.
  2. Move the mouse slowly in the drag direction.
Pinch
  1. Move the mouse pointer over the place where you want to start.
  2. Hold down the Option key, which makes two circles appear that stand in for your fingers.
  3. Hold down the mouse button and move the circles in (to pinch) or out (to un-pinch).
[Previous] [Contents] [Next]