What is this syntax when I was attempting to override a getter??
I\'m just messing around trying to learn more about how properties work in Objective-C. Here is my
It's called "Getter Indexed Accessors" as explained in the Key-Value Coding Programming Guide
From the documentation:
In order to support read-only access to an ordered to-many relationship, implement the following methods:
-countOfRequired. This is the analogous to the NSArray primitive method count.
-objectInorAtIndex: -One of these methods must be implemented. They correspond to the NSArray methodsAtIndexes: objectAtIndex:andobjectsAtIndexes:
-getImplementing this method is optional, but offers additional performance gains. This method corresponds to the:range: NSArraymethodgetObjects:range:.
You can implement such methods for performance reasons, as explained in the guide
If benchmarking indicates that performance improvements are required, you can also implement
-get. Your implementation of this accessor should return in the buffer given as the first parameter the objects that fall within the range specified by the second parameter.:range:
As an example
- (void)getEmployees:(Employee * __unsafe_unretained *)buffer range:(NSRange)inRange {
// Return the objects in the specified range in the provided buffer.
// For example, if the employees were stored in an underlying NSArray
[self.employees getObjects:buffer range:inRange];
}