Alan Quatermain

The Tumblog of one Jim Dovey, iOS Software Chief Architect at Kobo in Toronto, Ontario.
He Twitters, he has an , and can occasionally be found on LinkedIn or Facebook.
If you have a query, you can ask it here.

This blog contains personal opinions, and is not endorsed by any company.

3967381434

bbum's weblog-o-mat » iOS 4.3: imp_implementationWithBlock()

In iOS 4.3, there are 3 rather low level functions in the runtime that provide a new kind of bridge between Objective-C and Blocks with a specific goal of facilitating the dynamic generation of method implementations. Specifically:

IMP imp_implementationWithBlock(void *block);
void *imp_getBlock(IMP anImp);
BOOL imp_removeBlock(IMP anImp);

Okay, this is officially awesome. I hadn’t realised (or, thinking about it, I think I only forgot) that these were available in iOS 4.3. I discovered them in the Lion headers, and was planning on providing two-stage handling for 10.6/iOS4 vs. 10.7/iOSn in my awesome new open-source project. Now I can give 10.6 the finger and do it how I wanted to in the first place, woo!

2 notes

  1. do-nothing reblogged this from quatermain
  2. quatermain posted this