I saw some code on the apple website that goes like this
id <NSFetchedResultsSectionInfo> sectionInfo = ...
How is this different to the following?
NSFetchedResultsSectionInfo *sectionInfo = ...
I’m not so interested in NSFetchedResultsSectionInfo itself, but rather the way it’s declared.
Thanks a bunch!
Tristan
NSFetchedResultsSectionInfois a protocol. id is a way of declaring a generic object, andid <NSFetchedResultsSectionInfo>declares a generic object that must adhere to theNSFetchedResultsSectionInfoprotocol.