ios - How to measure continues shake in Objective C? -
i have measure continues shake in event application. accelerometer deprecated, using coremotion. using following code application.
- (void)motionended:(uieventsubtype)motion withevent:(uievent *)event { if (event.type == uieventtypemotion && event.subtype == uieventsubtypemotionshake) { nslog(@"shaking..."); } }
its detect event when stop shake. there way through can detect continues shake event ?
thanks in advance.
can't use motionbegan method?
- (void)motionbegan:(uieventsubtype)motion withevent:(uievent *)event { if (event.type == uieventtypemotion && event.subtype == uieventsubtypemotionshake) { nslog(@"shaking..."); } }
Comments
Post a Comment