Thursday, July 9, 2009

Loggolas XCode-ban

Ahhoz, hogy lassuk amit logolunk be kell kapcsolni a Debugger Console-t.

NSLog

Logs an error message to the Apple System Log facility.

void NSLog (NSString *format, ... ); 

Discussion

Simply calls NSLogv, passing it a variable number of arguments.

Availability
  • Available in iPhone OS 2.0 and later.

format specifiers:
%@ Object
%d, %i signed int
%u unsigned int
%f float/double

%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

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.