如何测试倾斜效果? - iPhone模拟器

发布于 2024-08-07 20:01:44 字数 87 浏览 8 评论 0原文

我正在尝试写一个游戏。该游戏使用倾斜效果,但我不知道如何在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...?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(6

尾戒 2024-08-14 20:01:45

简短的回答:你不能,不能直接。您必须使用真实设备。

更长的答案:您可以子类 UIAccelerometer 并按照您的意愿进行操作。您可以模拟输入,或者编写一个客户端和服务器对,将加速度信息从真实设备发送到在模拟器中运行的应用程序,或者如果您喜欢挥舞笔记本电脑,则可以从 Macbook 的加速计发送加速度信息。

Short answer: You can't, not directly. You have to use a real device.

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.

情魔剑神 2024-08-14 20:01:45

尝试https://code.google.com/p/accelerometer-simulator/。它的功能与 iSimulate 相同——它将加速度计事件从手机发送到您的计算机——但它是免费且开源的。

Try https://code.google.com/p/accelerometer-simulator/. It does the same thing as iSimulate -- it sends accelerometer events from the phone to your computer -- but it's free and open source.

撧情箌佬 2024-08-14 20:01:45

There's an application in the AppStore called iSimulate which lets you feed an actual device's accelerometer inputs into the sim. You do need to have a device for testing.

硪扪都還晓 2024-08-14 20:01:45

相关说明,您还可以从 iphone/ipad 上运行的 safari 捕获加速度计数据
请参阅此演示 http://www.webdigi.co.uk/blog/2012/using-an-ios-device-to-control-a-game-on-your-browser/

ON a related note, you can also capture accelerometer data from safari running on your iphone/ipad
See this demo http://www.webdigi.co.uk/blog/2012/using-an-ios-device-to-control-a-game-on-your-browser/

原来是傀儡 2024-08-14 20:01:45

刚刚在问类似问题时看到了这一点 - 您现在实际上可以在新的 xcode 中设置界面方向,因此即使您不能直接“倾斜”它,您也可以将其设置为仅支持横向的位置 - 然后它将加载模拟器中的横向视图! :D

Just saw this when asking a similar question - you can actually set the interface orientation now in the new xcode, so even though you can't 'tilt' it directly, you can make it to where it only supports landscape - then it will load the landscape view in the emulator! :D

悍妇囚夫 2024-08-14 20:01:45

来自:http://developer.apple。 com/library/ios/#documentation/IDEs/Conceptual/iOS_Simulator_Guide/InteractingwiththeiOSSimulator/InteractingwiththeiOSSimulator.html

  1. 将指针放在要进行旋转的位置。
  2. 按住 Option 键。
  3. 将代表手指触摸的圆圈移动到起始位置。
  4. 通过按住 Shift 键移动捏合目标的中心,将圆圈移动到所需的中心位置,然后释放 Shift 键。
  5. 按住鼠标按钮,将圆圈旋转到结束位置,然后释放 Option 键。

From: http://developer.apple.com/library/ios/#documentation/IDEs/Conceptual/iOS_Simulator_Guide/InteractingwiththeiOSSimulator/InteractingwiththeiOSSimulator.html

  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.
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文