Search code examples
objective-cmacosfirst-responder

Where do FirstResponder methods come from?


I'm looking at IKImageDemo supplied by Apple, the rotate round-slider is linked to a setRotation: method in the FirstResponder. However, none of the objects in the project seem to HAVE such a method, and yet the code works.

I'm trying copy this into my own project, and MY FirstResponder doesn't have a setRotation: method, so I'm not sure where it lives. Google has been unhelpful...

thanks.


Solution

  • Well, the first responder in the app happens to be an instance of IKImageView. IKImageView responds to the setRotation: selector (which can be seen by passing respondsToSelector:@selector(setRotation:) to any instance of IKImageView), although I cannot find where in documentation it mentions the setRotation: method