Friday, January 1, 2010

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.

1 Comment RSS · Twitter

How can you see the CFRunLoop source?

btw, I recently wrote an intro post to NSRunLoop (focus on iPhone OS here):

http://bynomial.com/blog/?p=15

Leave a Comment