Fucking Blocks Syntax less than 1 minute read This is how you can declare a block in Objective-C As a local variable: returnType (^blockName)(parameterTypes) = ^returnType(parameters) {...}; As a property: @property (nonatomic, copy) returnType (^blockName)(parameterTypes); As a method parameter: - (void)someMethodThatTakesABlock:(returnType (^)(parameterTypes))blockName {...} As an argument to a method call: [someObject someMethodThatTakesABlock: ^returnType (parameters) {...}]; As a typedef: typedef returnType (^TypeName)(parameterTypes); TypeName blockName = ^(parameters) {...} Thanks to Mike Walker that, like me, he has a very bad memory for this sort of thing. Twitter Facebook LinkedIn Previous Next
Declarative UI talk at Google DevFest 2023 less than 1 minute read The past weekend I was invited to speak at the Google Dev Fest event in Venice. I shared my experience with building UI using a declarative approach, giving ...
Sunset on skillcertificationtimes.com less than 1 minute read Almost 2 years ago, this service aim to give us a clear expectation about Alexa skill review times.
Remote working talk at Google DevFest Veneto less than 1 minute read Yesterday I’ve got the chance to speak at Google Dev Fest Veneto about my experience as a remote worker.