0

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

我怎样才能添加它acceleration?当用户触摸项目并滑动时,我想注册一个acceleration 事件?

4

1 回答 1

0

这可能会有所帮助

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.
}
于 2012-09-04T05:52:26.837 回答