开发者

UITableView with Shake and play

i am trying to make a musical app for iphone. the app is simple. there is a couple of 开发者_运维知识库musical note sample (caf) files. when user taps the predefined positions on uıview(like strings). app plays note sample and add a string value to a nsmutablearray about note.

played note lists displays in a table.

now i want to add a shake and play mode to app. when user shake iphone, recorded notes start to play from first record to last record and loop again. also if user shake iphone harder notes will plays faster.

how can i do that. any idea? thanks


what bit do you need help with ? Shaking ? To tell how hard a phone is being shaken check the accelerometer values. I do something similar in one of my apps, checking magnitude and duration of acceleration in

  • (void) accelerometer:(UIAccelerometer *)accelerometer didAccelerate:(UIAcceleration *)acceleration;
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜