Why do argument lists in certain Cocoa methods end with a nil?

后端 未结 2 463
再見小時候
再見小時候 2020-12-07 02:38

Why do argument list in some methods end with nil? I have noticed this particularly in the collection classes, for example NSSet:

         


        
2条回答
  •  没有蜡笔的小新
    2020-12-07 02:44

    Variadic functions in Objective-C don't have a way of determining when your argument list ends, other than providing a nil argument.

提交回复
热议问题