Your approach is correct. To get the value back as a CFAbsoluteTime
, do:
CFAbsoluteTime time = [[tapTimes objectAtIndex:…] doubleValue];
Domanda
I want to store CFAbsoluteTime in NSMutablearray. Can I add like this ?
CFAbsoluteTime time = CFAbsoluteTimeGetCurrent();
[tapTimes addObject:[NSNumber numberWithDouble:(double)time]];
If so, after I store that, I need to retrieve that one and convert to CFAbsoluteTime for later calculation. I would like to know how to do.
Soluzione
Your approach is correct. To get the value back as a CFAbsoluteTime
, do:
CFAbsoluteTime time = [[tapTimes objectAtIndex:…] doubleValue];