Reputation: 11
I want to know the way to display images whenever the iPhone detects a shake.The images would be those stored in a folder in the iPhone. A source code would really be helpful.
Upvotes: 1
Views: 122
Reputation: 4606
- (void)motionBegan:(UIEventSubtype)motion withEvent:(UIEvent *)event {
if (event.subtype == UIEventSubtypeMotionShake) {
// The user shook the device
}
}
Upvotes: 3