NSLog is like a printf, but it does a bit more: A timestamp is added to the output. The output is sent to the Xcode console, or whatever stderr is defined as. It accepts all the printf specifiers, but it also accepts the @ operator for objects which displays the string provided by the object's description method.
"printf" is the name of one of the main C output functions, and stands for "print formatted". printf format strings are complementary to scanf format strings, which provide formatted input (lexing aka. parsing).
A static, plain-text Unicode string object which you use when you need reference semantics or other Foundation-specific behavior.
I want to know about the difference between the NSLog
and the Printf
statement in Objective-C (for application purpose...!)
Why do all developer use NSLog
instead of Printf
?
Both look similar, but what is the difference in internal working?
At which point can they be differentiated ?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With