2
= vs ==我在他们提到的苹果文档中看到=
,==
将表现相同。 https://developer.apple.com/library/content/documentation/Cocoa/Conceptual/Predicates/Articles/pSyntax.html#//apple_ref/doc/uid/TP40001795-SW1= NSPredicate
但在苹果的例子,他们使用在大多数情况下==
和=
的零检查。
在以下情况下使用=
安全吗?
NSPredicate(format: "firstName = %@", "Bunny")
,或者我们应该使用:
NSPredicate(format: "firstName == %@", "Bunny")
是否与谓词打交道时,两者之间有什么区别?