Where can I find the latest open source Base Classes used in Mac OS X like NSMutableDictionary, NSString, NS****, [closed]

StackOverflow https://stackoverflow.com/questions/13605540

سؤال

do you know some links where I can browse the source codes of base classes used in Mac OS X? I already have this link which I found very useful but based from what I encountered lately (when using NSCache) it seems that it's not the latest source code.

When I used the objectForKey: of NSCache, [NSCache cache:willEvictObject:] is called inside it. But based on the code in this link, there is no way that cache:willEvictObject will be called when objectForKey: is called. I need to know what really is the behavior of objectForKey method of NSCache.

Knowing the source code of classes of APIs helps greatly in debugging, optimization, and creating subclass from base classes.

هل كانت مفيدة؟

المحلول

do you know some links where I can browse the source codes of base classes used in XCode?

(Minor corrections beforehand: not "in Xcode", Xcode has nothing to do with these, they aren't part of Xcode but the part of the OS X and iOS SDKs. Also, it's spelled Xcode with a lowercase 'c'.)

Well, to the topic: no. The Cocoa frameworks are closed-source. One exception is CoreFoundation of which Apple provides the source code on http://opensource.apple.com , but Foundation and other frameworks aren't released publicly.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top