Trouble remembering format specifiers for numbers in NSLog
, etc? Check out this neat trick from Brent Simmons:
NSLog(@"t: %@", @([d2 timeIntervalSinceDate:d]));
Basically, covert them to NSNumber
using @()
and use the format specifier %@
, which is for objects.
Your feedback is valuable: Do you want more nuggets like this? Yes or No
.