NSLog(@"%@", [NSNumber numberWithInt:i]);
%@ Object
%d, %i signed int
%u unsigned int
%f float/double
%1.2f to controll number of decimals
%x, %X hexadecimal int
%o octal int
%zu size_t
%p pointer
%e float/double (in scientific notation)
%g float/double (as %f or %e, depending on value)
%s C string (bytes)
%S C string (unichar)
%.*s Pascal string (requires two arguments, pass pstr[0] as the first, pstr+1 as the second)
%c character
%C unichar
%lld long long
%llu unsigned long long
%Lf long double
// Get the Gregorian calendar
NSCalendar *cal = [[NSCalendar alloc] initWithCalendarIdentifier:NSGregorianCalendar];
// Get the date
NSDate* now = [NSDate date];
// Get the hours, minutes, seconds
NSDateComponents* nowHour = [cal components:NSHourCalendarUnit fromDate:now];
NSDateComponents* nowMinute = [cal components:NSMinuteCalendarUnit fromDate:now];
NSDateComponents* nowSecond = [cal components:NSSecondCalendarUnit fromDate:now];
NSAppleScript *script = [[NSAppleScript alloc] initWithSource:@"tell application \"System Preferences\" to set show all to true"];
[script executeAndReturnError:nil];