Make the protocol conform to NSObject
@protocol MTScrollViewDelegate <NSObject>
Otherwise the compiler doesn’t think that the object will respond to NSObject messages like respondsToSelector
, and will generate a warning. It will succeed at runtime without issues either way.