Archive for January 1, 2010

Friday, January 1, 2010 [Tweets] [Favorites]

NSRunLoop Internals

Mike Ash:

It’s also helpful just to demystify a class. It’s easy to get into magical thinking, where you see a class as being incomprehensible and elevated above the mortal plane. The fact is, while the particular implementations of some of these classes can be pretty sophisticated (the CFRunLoop source will make your eyes bleed), the basics of what they do and how they do it are usually very straightforward. For 99.9% of the APIs in Cocoa, they aren’t there because they’re doing something amazing that you could never achieve, but rather they simply exist to save you the time and trouble of having to write it all yourself.