accelerometer - How to use Shake API in iPhone SDK 3.0? -


Apple announced the Shake API in the iPhone SDK 3.0. I do not get any information about this new feature

Who knows how to use it? Any example, the link would be nice.

The APIs you are looking for are:

  - (Zero) speedbuggan: (UIEventSubtype) document with speed: (UIEvent *) event; - (void) Speed ​​canceled: (UIEventSubtype) Documents with speed: (UIEvent *) event; - (zero) speed-bound: Documenter with UIEventSubtype speed: (UIEvent *) event; Generally, you only apply it:  
  - (zero) speedend: (UIEventSubtype) document with speed: (UIEvent *) event {if (event.type == UIEventSubtypeMotionShake) {/ In addition, you want to handle it in dynamic: with: not speed: with: with:  

In your UIViewController subclass (UIViewController is a subclass of UIResponder) Additionally, . MotionBegan: withEvent: called when the phone suspects are getting nervous, but the OS can determine the difference between moving with a user's purpose and walking accidentally (walking on the stairs). If the OS decides that it was not a real shake after the speed: the campaign: it is said that it will call the speed: instead of speeded-up: avent:.


Comments

Popular posts from this blog

c# - ListView onScroll event -

PHP - get image from byte array -

Linux Terminal Problem with Non-Canonical Terminal I/O app -