1

I can detect shake in iPhone using Cocos 2D when I use:

-(void)accelerometer:(UIAccelerometer *)accelerometer didAccelerate:(UIAcceleration *)acceleration

Now, I want to do shake the iPhone using Cocos 2D. Who can help me?

Bijoy Thangaraj
  • 5,434
  • 4
  • 43
  • 70

2 Answers2

0

You cannot physically shake your iPhone using Cocos2d. But if you want to vibrate your phone programatically, check this: Making the iPhone vibrate

Community
  • 1
  • 1
Bijoy Thangaraj
  • 5,434
  • 4
  • 43
  • 70
0

In the iOS Simulator, click "Hardware" and in the drop down menu you will see "Shake Gesture"... click that

Savlon
  • 744
  • 2
  • 11
  • 18