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

curl - PHP fsockopen help required -

HTTP/1.0 407 Proxy Authentication Required PHP -

c# - Resource not found error -