Shake to open view modally

Posted by Vivas on Stack Overflow See other posts from Stack Overflow or by Vivas
Published on 2010-04-22T23:44:02Z Indexed on 2010/04/23 2:03 UTC
Read the original article Hit count: 328

Filed under:
|
|
|

Hi,

I have my 'shake' working fine (using motionEnded), based off of Apple's GLPaint code. When the user shakes the device (running 3.0 and up) I want to open a view controller modally using presentModalViewController.

In my appdelegate I have the notification (as per the GLPaint sample code):

[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(shakeToOpenHiddenScreen) name:@"shake" object:nil];

In my shakeToOpenHiddenScreen I just want to open view 'x' modally but I don't think that my appdelegate will respond to presentModalViewController.

Is there a way around this?

© Stack Overflow or respective owner

Related posts about iphone

Related posts about shake