I think people either don't know this or forget about it, but the OS X kernel environment is open source, which obviously is the core of the iPhone OS as well. It doesn't include all of the stuff at the GUI layer, but there is a ton of code in there that is generally kept in sync with current consumer product releases.
In addition to being the core of OS X, Darwin itself is a free-standing open source operating system in the same sense that Linux or FreeBSD is. As far as I know, you can install X11 on it and run it as a standard UNIX OS with whatever window manager and desktop environment you like.The Darwin repository also hosts CoreFoundation lite, which has the source for a number of classes used in the C-based CoreFundation API that backs Cocoa's Foundation framework. If you want to see how the guts of NSString work, you can just look at CFString.c. In fact, there's a lot of interesting stuff in there even if you're not writing Cocoa apps. A free online ADC account is enough to get access.
我认为人要么不知道或忘记它，但OS X的内核环境是开源的，这显然是在iPhone OS的核心以及。它不包括所有在GUI层的东西，但有在那里的代码吨，一般是在目前的消费产品发布保持同步。