I have been seeing some code around that resembles the following:
@protocol MyProtocol <NSObject>
// write some methods.
@end
Is there any particular reason why MyProtocol conforms to the NSObject protocol? Isn't that rather redundant in that if you do something such as:
id <MyProtocol> foo; // foo here conforms to NSObject AND MyProtocol?
Just curious what the logic is.
See Question&Answers more detail:os