10.04.2013 22:35 Uhr, Quelle: The Unofficial Apple Weblog

DevJuice: Better Objective-C associated objects

iOS/OS X internals guru Gwynne Raskind tipped me off to a much better way of creating associated object keys. Until now, I've been doing this: static const char nametag_key; return objc_getAssociatedObject(self, (void *) &nametag_key); Turns out there's a much easier and better way. That's because Apple's selector implementation uses a fixed address. That means you can de

Weiterlesen bei The Unofficial Apple Weblog

Digg del.icio.us Facebook email MySpace Technorati Twitter

JustMac.info © Thomas Lohner - Impressum - Datenschutz