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 6168565
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T22:42:35+00:00 2026-05-23T22:42:35+00:00

In looking at one of Apple’s examples, in the TableViewController.m, they have this: //

  • 0

In looking at one of Apple’s examples, in the TableViewController.m, they have this:

// Private TableViewController properties and methods.
@interface TableViewController ()

@property (nonatomic, retain) NSMutableArray* sectionInfoArray;
@property (nonatomic, retain) NSIndexPath* pinchedIndexPath;
@property (nonatomic, assign) NSInteger openSectionIndex;
@property (nonatomic, assign) CGFloat initialPinchHeight;
... more properties and methods
@end

@implementation TableViewController
... usual stuff

I’m wondering why they put these properties in the .m file and how this is private. It seems like anyone who imports the TableViewController.m file can use these properties and methods right? Why not use the @private in the .h file?

  • 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-05-23T22:42:35+00:00Added an answer on May 23, 2026 at 10:42 pm

    What they’re doing is declaring a category on the class, but since this is done in the .m file, the effect is that those methods are “invisible”.

    This doesn’t mean however that those methods cannot be called from the outside. This is due to the fact that there is no real privacy in objective c, because we’re dealing with messages, not method calls. This means you can send an object a message even if you do not know if that object actually implements the method you’re trying to call. The receiving object will determine at runtime if it can handle this call, maybe it will even forward it, and it will make no difference whether the method was known to the calling object or not.

    This is one of the reasons why it is possible to call private APIs and get rejected for it.

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

Sidebar

Related Questions

I'm looking for Apple documentation regarding the delegate and datasource methods for NSTableView. They
I'm looking for one line code examples in various languages for getting a valid
Looking back at my past projects I often encounter this one: A client or
I have another orientation problem. But this one is very tricky. My RootViewController is
I noticed by looking at sample code from Apple, that they tend to design
I have a list of words. Lets say they are 'Apple', 'Orange', and 'Pear'.
Looking at Apple Website they do an outstanding job with the quicktime movies they
I'm looking over Apple's sample application EditableDetailView, and noticed that in one of their
I am looking for one or more resources on best practices for c# codegen
I am looking for one of 2 things, Test Driven Development, or Architecture Trainings

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.