Saturday, October 6, 2012

Yet an other Objective-C block for fun

You know what, I could not live without blocks... It's sad but true.

Action blocks!

If you read all my previous block posts you now know how to use a block in a NSTimer. It's pretty neat and few people did take the time to say so in the comments which is great!

Now let's push the principle in the UI land. How about a block as target/action for any UIControl subclass ? That would be great not to have to write an other delegate method...