Overridden by subclasses to return the name of the inverse relationship from a relationship specified by a given key.
SDK
- macOS 10.0+
Framework
- Foundation
Declaration
Return Value
The name of the inverse relationship from the relationship specified by relationship
.
Discussion
For a given key that defines the name of the relationship from the receiver’s class to another class, returns the name of the relationship from the other class to the receiver’s class. For example, suppose an Employee class has a relationship named department
to a Department class, and that Department has a relationship named employees
to Employee. The statement:
[employee inverseForRelationshipKey:@"department"];
returns the string employees
.
If you have an instance of the class the receiver describes, you can use the NSObject
instance method inverse(for
instead.