What exactly is a no-parameter method name?
From the Core Data docs:
A property name cannot be the same as any no-par开发者_运维技巧ameter method name of NSObject or NSManagedObject—for example, you cannot give a property the name “description”
Ok, so -description is blocked for property names. I guess it's because of KVC. But what exactly does "no-parameter" mean? Is that any method which does not take a parameter?
So in other words:
- Any property of NSObject or NSManagedObject
- ANY method name of NSObject or NSManagedObject, which does not take a parameter
Did I get that right?
Any unary message is a no parameter method name. I.e., -copy, -retain, -release, are all unary messages when sent, and no parameter methods when you define them. An example of a keyword message (or a method with parameters) is: +stringWithString:, etc.
精彩评论