我该如何测试倾斜效应? - iPhone模拟器 [英] How can i test tilt efftect? - IPhone Simulator
问题描述
我正在尝试写游戏。该游戏使用倾斜效果,但我不知道如何在Iphone Simulator 3.0上测试它。
我在互联网上搜索它,但结果为零。我怎么能......?
I am trying to write a game. That game uses tilt effect, but i don't know how to test it on Iphone Simulator 3.0. I search it on internet, but the result is zero. How can i...?
推荐答案
简答:你不能,不能直接。你必须使用一个真实的设备。
Short answer: You can't, not directly. You have to use a real device.
更长的答案:你可以继承 UIAccelerometer
并按你的意愿做。您可以模拟输入,或编写一个客户端和服务器对,将真实设备的加速度信息发送到在模拟器中运行的应用程序,或者如果您喜欢挥动笔记本电脑,则从Macbook的加速度计中发送加速度信息。
Longer answer: You could subclass UIAccelerometer
and do as you like. You could simulate input, or write a client and server pair that sends acceleration information from a real device to your app running in the simulator, or from your Macbook's accelerometer if you fancy waving your laptop around.
这篇关于我该如何测试倾斜效应? - iPhone模拟器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!