Difference between NSLog and Printf statement for ObjectiveC

后端 未结 4 2122
你的背包
你的背包 2020-12-18 18:52

I want to know about the difference between the NSLog and the Printf statement in Objective-C (for application purpose...!)

Why do all deve

4条回答
  •  庸人自扰
    2020-12-18 19:13

    I see two main differences between NSLog and printf:

    1. NSLog supports NSString objects through the %@ extension;

    2. furthermore, NSLog automatically adds time and process data (e.g., 2012-01-25 17:52:10.479 process[906:707])

提交回复
热议问题