Logging

suggest change
NSLog(@"Log Message!");
NSLog(@"NSString value: %@", stringValue);
NSLog(@"Integer value: %d", intValue);

The first argument of NSLog is an NSString containing the log message format. The rest of the parameters are used as values to substitute in place of the format specifiers.

Formatting works like printf, plus the %@ specifier for an Objective-C object. %@ sends description and does not treat % inside that string as a specifier. It also prints (null) when the object is nil, which this is not:

NSLog(@"%s", [object description].UTF8String);

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:



Table Of Contents