I have generated NSManagedObject
subclasses (Photographer
and Photo
) using the data model editor - they have a Photographer
->To-Many-> Photo
relationship.
Photographer
(CoreDataProperties) category came with a property:
@interface Photographer (CoreDataProperties)
...
@property (nullable, nonatomic, retain) NSSet<Photo *> *photos;
@end
What does NSSet<Photo*>
mean? Can you specify what type of objects should be in an NSSet
using protocol-like notation? Can't find any info about it in the documentation or anywhere else.
In Xcode 7, Apple has added 'Lightweight Generics' to Objective C.
They will generate compiler warnings if there is a type mismatch.
Objective-C declarations of NSArray, NSSet and NSDictionary types using lightweight generic parameterization are imported by Swift with information about the type of their contents preserved.