【问题标题】:Catch acceleration event on screen在屏幕上捕捉加速事件
【发布时间】:2012-09-04 04:40:37
【问题描述】:

我有一个像轮盘赌一样的菜单,它像一个轮盘一样旋转。 为了捕捉我正在使用的事件touch began/move

如何添加 acceleration ?我想注册一个acceleration 事件,当用户触摸一个项目并滑动时??

【问题讨论】:

    标签: iphone objective-c acceleration


    【解决方案1】:

    This might help

    Listing 4-4  Receiving an accelerometer event
    - (void)accelerometer:(UIAccelerometer *)accelerometer didAccelerate:(UIAcceleration *)acceleration
    {
    UIAccelerationValue x, y, z;
    x = acceleration.x;
    y = acceleration.y;
    z = acceleration.z;
    
    // Do something with the values.
    }
    

    【讨论】:

    猜你喜欢
    • 2013-04-29
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2014-02-09
    • 2018-03-12
    • 2015-11-21
    相关资源
    最近更新 更多