【问题标题】:Collision Detection with animateWithDuration使用 animateWithDuration 进行碰撞检测
【发布时间】:2011-06-26 17:32:02
【问题描述】:

我在底座上有两个 UIButton,单击第三个 UIButton 时会移动到特定位置(这些位置是在应用复杂算法时生成的)。为了移动它们,我使用了 animateWithDuration:delay:options。当我制作一个不同的应用程序时,我使用 NSTimers 在屏幕上随机移动 UIButton,因此使用简单的 CGRectIntersectsRect 可以轻松检测碰撞。我有两个选择: 1. 如果我使用 animateWithDuration 移动它们,是否可以检测到它们之间的碰撞? 2. 如果我使用 NSTimers,我将能够检测到碰撞,但在这种情况下,我如何将它们移动到屏幕上的特定位置?任何帮助将不胜感激!

【问题讨论】:

    标签: uibutton collision-detection


    【解决方案1】:
    猜你喜欢
    • 2010-11-21
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2012-03-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多