I successfully got to the Callbacks-chapter, which means you guys did a hell of a job writing this book! But now, I do have a question to which I haven’t found the answer here yet:
Why do we define and implement the method for sayOuch with an argument (NSTimer *)t?
With my very flimsy knowledge of Objective-C so far I was kind of wondering where I missed where we passed the argument to the method, but I guess we just don’t. So why can’t we change this:
- (void) sayOuch; and remove the colon in the NSTimer-object, so we get:
__unused NSTimer *t = [NSTimer scheduledTimerWithTimeInterval:2.0
Doing this still lets the NSTimer-object fire and log “Ouch” to the debug screen every 2 seconds.