开发者

how to indicate shake is in right or left?

i want to implement next previous functionality using below function.

- (void)motionEnded:(UIEventSubtype)mt withEvent:(UIEvent *)event

But i dont know how to indicate in left or roght. Ple开发者_开发问答ase give me advice.


There is no way using this method to determine whether the shake was to the left or the right, it just detects a general shaking motion. You will need to process the accelerometer output in detail to achieve what you want. Look into the UIAccelerometer class and this similar question.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜