Reputation: 3535
I am on objective-c, macOS.
I have an options Dictionary declared like this
@property NSMutableDictionary* options
Now the object containing the dictionary needs to be copied with copyWithZone including the options.
I can invoke "copy" on the dictionary. But how do i make sure that every object added to the dictionary (which basically can be any kind of object), complies to the NSCopying Protocol?
Something like
@property NSMutableDictionary* <NSCopying> options
Can i add something to the property declaration (that i didn't find out yet) or do i need to subclass NSDictionary (which i most likely want to avoid)
Regards
Pat
Upvotes: 0
Views: 37