ios - Shake doesn't work when alert is shown -


i implemented shake gesture event. when shake occurs stuff.

however if alert shown don't event.

here have:

- (void)viewdidappear:(bool)animated{     [super viewdidappear:yes];     // register shake detection     [self becomefirstresponder]; }  - (bool) canbecomefirstresponder{     return yes; }   - (void)motionended:(uieventsubtype)motion withevent:(uievent *)event {      if (motion == uieventsubtypemotionshake){          dlog(@"shake ended");     } } 

is possible shake gesture when alert shown ?

try

 - (void)motionended:(uieventsubtype)motion withevent:(uievent *)event {     if ( event.subtype == uieventsubtypemotionshake )     {         // put in code here handle shake     }      if ( [super respondstoselector:@selector(motionended:withevent:)] )         [super motionended:motion withevent:event]; }  - (bool)canbecomefirstresponder { return yes; } 

Comments

Popular posts from this blog

How to logout from a login page in asp.net -

Stack level too deep error after upgrade to rails 3.2 and ruby 1.9.3 -