开发者

iphone App to use Shake

Can someone help me with creating an App which will increase a numb开发者_如何学Cer counter when the Iphone is shaken.

Regards,

Vinay


I think you have alot of reading ahead of you but the best way would be to find an example that uses the vibration sensor and modify it to your purpose. Also, I would try to find what API in the iphone sdk is responsible for this then I am sure you will find the functions you need for doing this.


You ought to be able to use

- (void)motionEnded:(UIEventSubtype)motion withEvent:(UIEvent *)event;

See this question for more info.

EDIT: That should help you handle the shake. If you're still needing help with basic things like incrementing counters and updating the UI, I'd recommend the Pragmatic Programmers' iPhone SDK Development book.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜