views:

16

answers:

0

Just finishing off my first iPhone app - it seems to be working fine in the simulator but on the phone the motion event's timestamp is returning 0.00 ?

- (void)motionEnded:(UIEventSubtype)motion withEvent:(UIEvent *)event{
   NSLog(@"shaketime = %@", event);
}

in the simulator:

shaketime = <UIMotionEvent: 0x591b2f0> timestamp: 314678 subtype: 1
shaketime = <UIMotionEvent: 0x591b2f0> timestamp: 314679 subtype: 1

on the phone:

shaketime = <UIMotionEvent: 0x10f7a0> timestamp: 0 subtype: 1
shaketime = <UIMotionEvent: 0x10f7a0> timestamp: 0 subtype: 1

The thread below shows how to generate an equivalent value timestamp, is this the way to go? or is there something else I need to do to get this to work?

http://stackoverflow.com/questions/2405832/uievent-has-timestamp-how-can-i-generate-an-equivalent-value-on-my-own