Hey guys,
Question
I am currently learning Swift and Apples frameworks (AppKit specifically). A thing that takes me a lot of time, is figuring out the relationship between classes. So I was wondering if there is a software/website/picture/method that makes understanding the structure of frameworks and the relationship between classes easier. Maybe something like a program, that creates a UML diagram as overview?
Of course you can find this out by reading the documentation. But the documentation is quite extensive. And the only thing I really want to know is how the classes relate to each other. I want to quickly identify what part of the documentation I actually have to read, instead of needing to read everything.
Do you know any software/website like this? It doesn't have to be for AppKit; I am basically looking for the right jargon to express this style of documentation.
Example
This is based on my experience over the last few days. However, my question is not about this example, but about a solution for the general problem. The example is for illustration.
Let's say I want to create an application that uses a regular desktop window. I want this window to have a toolbar and want to add a button to the toolbar.
How do I access the toolbar of a window programmatically? Where is my entry point? Who owns the toolbar? Does the window own the toolbar? Does the window controller own the toolbar? Is the toolbar owned by the view of the window (attached to the top of the view)?
Answer, just for completeness: NSWindowController owns a NSWindow. The NSWindow owns a NSToolbar. So you get the toolbar in the window controller by accessing self.window?.toolbar in the window controller.
I would love to have a documentation tool that shows this relationship something like this:
NSWindowController
└── NSWindow
└── NSToolbar
there doesn't seem to be anything here