Is there an Objective-C API that list all classes in their Hierarchy? For example I am interested to know what classes does NSUserDefaults inherits from. I have already checked the OS X Version 10.5 Delta but it did not give anything away.
Just to explain what I’m after, for example in Java we have javadoc for every single object.
Is there an Objective-C API that list all classes in their Hierarchy? For example
Share
Because you mentioned javadoc my answer assumes you’re not actually looking for an API / programmatic way of doing this, but, rather, simply documentation.
The documentation for NSUserDefaults is here:
https://developer.apple.com/documentation/foundation/nsuserdefaults?language=objc
You can locate this in a couple ways:
Google isn’t actually the easiest way – and coming from the Microsoft world, where simply typing a class name into google will pop up the msdn documentation as the first suggestion, this was a bit unnerving. However, I’ve found typing the word "documentation" after the class name usually comes up with an apple documentation link… but not always. Sometimes specifically searching apple’s docs is the best way for this "manual" approach.
Xcode has a direct link to the documentation – and is more convenient than googling. Look under "Help" > "Documentation and API Reference". From here just paste the class name into the search box.
DashDoc is surprisingly great. You can hook it up to a keyboard shortcut, and get documentation in a heartbeat from anywhere. I’m actually loving it… and I only found it a couple weeks ago. It’s available on the AppStore.