gpt4 book ai didi

ios - 如何开发 "spin the bottle"应用

转载 作者:可可西里 更新时间:2023-11-01 17:10:40 24 4
gpt4 key购买 nike

我正在玩转瓶游戏。我无法弄清楚如何通过滑动手指的速度来控制瓶子的旋转速度。我希望它像命运之轮一样工作,滑动得越快,它旋转得越快。

我开始使用 UIRotationGestureRecognizer 进行开发,但我真的认为这不是最好的方法。

最佳答案

嘿检查 this demo .

您必须计算速度。这取决于 touchesMoved:withEvent:touchesEnded:withEvent:


这也是有用的链接:iphone development - UIRotationGestureRecognizer (Clockwise & counter Clockwise detection)?

关于ios - 如何开发 "spin the bottle"应用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9595727/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com