I have slideTimer
which is a NSInteger
and I want to convert it to NSTimeInterval
.
I tried like this:
NSTimeInterval slider = (NSTimeInterval)slideTimer;
but it is not working.Any idea?
NSTimeInterval is just:
typedef double NSTimeInterval;
This code:
int i = 1500;
NSTimeInterval interval = i;
NSLog(@"%d", (int)interval);
Outputs:
2011-11-07 07:47:05.579 Craplet[7608:707] 1500
BTW, in XCode 4.2, hold down control and apple keys and types will have underlines. Click on that and you'll see the definition.