Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can i test accelerometer effect in Xcode simulator?

I am working on an app that manages the alpha property of image views. Alpha property can increase/decrease as the user moves the phone. I saw something on here about using a subclass of UIAccelerometer. Can anyone help me to do this so that I can test it on simulator? Thanks

like image 326
Surjeet Singh Avatar asked May 14 '13 11:05

Surjeet Singh


People also ask

How do you shake device in Simulation?

iOS Device: Shake the device a little bit. iOS Simulator: Hit Ctrl + Cmd ⌘ + Z on a Mac in the emulator to simulate the shake gesture, or press Cmd ⌘ + D . Android Device: Shake the device vertically a little bit.

Does iOS simulator simulate performance?

The simulator does a really lousy job of indicating app performance. In fact it doesn't try. For most things the simulator is much, much faster than an iOS device. It runs your code on an x86 processor, which is much faster than the ARM and has many times more memory.

What is iOS accelerometer?

An accelerometer measures changes in velocity along one axis. All iOS devices have a three-axis accelerometer, which delivers acceleration values in each of the three axes shown in Figure 1. The values reported by the accelerometers are measured in increments of the gravitational acceleration, with the value 1.

How do I use the shake test on my iPhone?

In the Hardware menu, choose Shake Gesture. That's it. Your shake handler should be called when you do so.


1 Answers

Yo cant test it using simulator, you should use real device for testing accelerometer. Check here, it may help you.

like image 51
Mumthezir VP Avatar answered Oct 08 '22 02:10

Mumthezir VP