Basic Objective-C syntax: “%@”?

后端 未结 4 1729
囚心锁ツ
囚心锁ツ 2021-02-09 04:28

I\'m working through the Stanford iPhone podcasts and have some basic questions.

The first: why is there no easy string concatenation? (or am I just missing it?)

4条回答
  •  孤独总比滥情好
    2021-02-09 04:53

    Also, %@ is fairly versatile, as it actually inserts the result of the argument's description method into the result string. For NSString, that's the string's value, other classes can provide useful overrides. Similar to toString in Java, for example.

提交回复
热议问题