Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8903501
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T01:53:06+00:00 2026-06-15T01:53:06+00:00

I have been struggling with this for some time now. There have been many

  • 0

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

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T01:53:07+00:00Added an answer on June 15, 2026 at 1:53 am

    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:

    unsigned int methodCount;
    Method *methods = class_copyMethodList(theClass, &methodCount);
    for (int i = 0; i < methodCount; i++) {
        Method method = methods[i];
        NSString *methodName = NSStringFromSelector(method_getName(method));
        // collect name in an array or print it.
    }
    free(methods);
    

    There is also a handy terminal tool that does this for you called class-dump.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Really been struggling with this one for some time now, i have many text
This is something I have been struggling about for some time now. The thing
I have been struggling with this for some time now scanning the net for
I have been struggling with this for quite some time now. jQuery.ajax in the
Been struggling with this for some time now. Basically I have 6 fields, name,
I have been struggling with this for quite some time having been accustomed to
Good Day, I have been struggling to get this right for quite some time
I've been struggling with this specific set of tables for some time. There are
I've been struggling with this for some time now and I just can't find
I have been struggling with this problem for quite a long time now. I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.