Type casting in objective-c
-
23-09-2019 - |
문제
Is there any way how can i convert a nstimeinterval type value to a string type in xcode?
Thanks in advance Joy
해결책
An NSTimeInterval is a double
. You could use
return [NSString stringWithFormat:@"%g", timeInterval];
for more sophisticated format (e.g. "2 minutes 40 seconds"), write your own function.
제휴하지 않습니다 StackOverflow