In iPhone SDK 4.0, UIApplication has a new method, setKeepAliveTimeout: that requires a second parameter of type void(^)(void).
-(BOOL)setKeepAliveTimeout:(NSTimeInterval)timeout handler:(void(^)(void))keepAliveHandler
What exactly does the syntax of the second parameter mean, and how would I declare a function/handler that I can pass into it?
FWIW the following is not what it’s looking for…
void SomeHandler( void )
{
}
It is a “block”, a new feature Apple added to C in Snow Leopard. Lots more info available at:
https://developer.apple.com/library/mac/documentation/Cocoa/Conceptual/Blocks/Articles/00_Introduction.html