I have been struggling with this for some time now.
There have been many times I wanted to change something minor in a control, but I had to redraw the entire thing just to adjust it.
Like a NSPathControl, I just wanted to change the background of the Path Control, I ended up creating a whole new control just for that small adjustment…
Apple uses private methods, like the following:
- (void)_drawContextMenuHighlightForIndexes:(NSIndexSet *)rowIndexes clipRect:(NSRect)rect;
I have found this in a Stackoverflow-Post.
How should I know about these?
I don’t think they are meant to be public, but this is just WAY easier.
Where do these people know this from?
Are there any references? I wouldn’t need to know any source code, I would only have to know the names of the private methods.
So my question, how can I get the names of private methods of AppKit classes?
Thanks
Private class method names can be obtained using Obj-C runtime functions. To get a list of methods of a class you can do something like:
There is also a handy terminal tool that does this for you called class-dump.