上一篇文章讲了iOS模拟器的基本用法,这一篇主要讲模拟器更深层次的用法,对开发、测试有用,主要参考了apple官方文档。
Menu option | Hardware action |
---|---|
Rotate Left | Rotates the simulator to the left.(向左旋转,测试横竖屏切换) |
Rotate Right | Rotates the simulator to the right.(向右旋转,测试横竖屏切换) |
Shake Gesture | Simulates shaking the device.(摇动模块器,测试传感器) |
Home | Displays the Home screen of the simulated device.(切到后台,测试前后台切换) |
Lock | Displays the Lock screen.(锁屏) |
Simulate Memory Warning | Sends the frontmost app a simulated low-memory warning.(模拟内存警告,必测点,校验app在模拟内存警告时的处理) For information on how to handle low-memory situations, see “Observing Low-Memory Warnings” in iOS App Programming Guide. |
Toggle In-Call Status Bar | Toggles the status bar between its normal state and its in-call state. This command shows how your app’s user interface looks when a user launches your app during a call or while navigation is running. The in-call state bar is used when a phone call is in progress, a FaceTime call is in progress, or Maps in iOS 6 is navigating. The status bar is taller in its in-call state than in its normal state.(模拟呼 叫,测试app对中断的反应) |
Simulate Hardware Keyboard | Toggles the software keyboard on an iPad simulator. Turn off the software keyboard to simulate using a keyboard dock or wireless keyboard with an iPad device. Note: The Mac’s keyboard can be used as input into the simulator at all times. |
iOS Uses Same Keyboard Layout As OS X | Automatically selects the iOS keyboard that most closely matches the keyboard layout of your Mac. |
TV Out | Opens a window simulating a device’s TV Out signal. Note: Several TV Out resolutions are available by choosing Hardware > TV Out > desired resolution. |
Gesture | Desktop action |
---|---|
Tap | Click. |
Touch and hold | Press and hold down the mouse button or trackpad. |
Double-tap | Double-click. |
Drag | Drag. |
Swipe | Drag. |
Flick | Drag quickly. |
Two-finger Drag | 1. Place the pointer where you want the two-finger drag to occur. 2. Hold down the Option key. 3. Move the circles that represent finger touches to the start position. 4. Move the center of the pinch target by holding down the Shift key, moving the circles to the desired center position, and releasing the Shift key. 5. Hold down the Shift key and the mouse button, move the circles in the direction you want to drag, and release both the Shift key and the mouse button. |
Pinch | 1. Place the pointer where you want the pinch to occur. 2. Hold down the Option key. 3. Move the circles that represent finger touches to the start position. 4. Move the center of the pinch target by holding down the Shift key, moving the circles to the desired center position, and releasing the Shift key. 5. Hold down the mouse button, move the circles in and out to the end position, and release the Option key. |
Rotate | 1. Place the pointer where you want the rotation to occur. 2. Hold down the Option key. 3. Move the circles that represent finger touches to the start position. 4. Move the center of the pinch target by holding down the Shift key, moving the circles to the desired center position, and releasing the Shift key. 5. Hold down the mouse button, rotate the circles to the end position, and release the Option key. |
Accelerometer
Gyroscope
Camera
Proximity Sensor
Microphone Input
Apple Push Services
Privacy alerts for access to Photos, Contacts, Calendar, and Reminders
The UIBackgroundModes
key
iCloud document syncing and key-value storage support
Unsupported frameworks include:
External Accessory
Media Player
Message UI
Event Kit
In UIKit, the UIVideoEditorController
class