Can i test accelerometer effect in Xcode simulator?

旧时模样 提交于 2019-12-01 04:24:39

问题


i am creating a app that manage the alpha property of image views. alpha property increase/decrease as the user moves the phone.I saw something on here about using a subclass of UIAccelerometer. Can any one help me to do this so that i can test it on simulator. Thanks


回答1:


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




回答2:


You can "capture" accelerometer data coming from a real device.

You can purchase iSimulate

here: http://bobueland.com/cocos2d/2011/how-to-install-isimulate/

..or

you can use a free solution: accelerometer-simulator

More about how to install or tutorial:

  • http://builtby.me/2012/07/howto-use-the-accelerometer-in-the-iphone-simulator/
  • http://builtby.me/2012/07/iphone-accelerometer-visualizer/
  • http://myfirstiphoneapp.co.uk/2011/07/receiving-accelerometer-data/



回答3:


You can't test Accelerometer feature on Xcode simulator.

For this, see following on apple's site.

Limitations of Testing in iOS Simulator




回答4:


Accelerometer does not work on iPhone/iPod Simulator. Neither "Hardware->Shake Gesture" use accelerometer nor the orientation change of safari on simulator.



来源:https://stackoverflow.com/questions/16542200/can-i-test-accelerometer-effect-in-xcode-simulator

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!