SDK 3.0 Shake instead of Accelerometer

June 19, 2009 § 2 Comments

You don’t need to code Accelerometer to detect complex shake events. Shake APIs will take care of the detection.

Shake Events

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

Advise to use this Shake gestures with less code, more accurate, better performance instead of using Accelerometer of detecting shaking.

Advertisements

§ 2 Responses to SDK 3.0 Shake instead of Accelerometer

  • shawn says:

    Has anyone been able to get these to actually work? I added the motionEnded API into code but it never gets called. Tried both on Itouch and simulator (^appleZ) Thee is no new sample code on the dev center either.

    • svwebbuilder says:

      Thanks. I am not intended to have folks following every single post. This is my developer log where I keep my developer journal like Captain Kurt in Star Trek.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

What’s this?

You are currently reading SDK 3.0 Shake instead of Accelerometer at Web Builders.

meta

%d bloggers like this: