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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T21:30:50+00:00 2026-05-26T21:30:50+00:00

Like: @interface ClassXXName(private) – (void) xxxfunctions @end or user category methods?

  • 0

Like:

@interface ClassXXName(private)
- (void)  xxxfunctions
@end

or user category methods?

  • 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-26T21:30:51+00:00Added an answer on May 26, 2026 at 9:30 pm

    @interface Foo() creates a class extension (I stand corrected, props to bbum) on interface Foo which is like additional methods added to the interface. Some people also use @interafce Foo(Private) (category) instead of a class extension with (). It’s more like “injecting” new methods into a class from outside the class.

    Placing this in the .m file just keeps other things from “seeing it” in the .h file, but that’s it. Basically people normally use categories or class extensions in .m files to specify private interfaces, but they are also used for things like UIKit uses categories to add row and section public methods to NSIndexPath. (This can be confusing.)

    You don’t really need to define private methods this way, but if you have a method called bar that calls method foo before foo is defined in the source file you’ll get a compiler warning something like “object self may not respond to foo”. You can get rid of that by defining foo before you define bar or any other foo-calling code. It’s the same with plain C and functions.

    Like Ole says this doesn’t stop anyone from calling the private methods, it just declares your intention that they be private and causes the compiler to generate the “may not respond to” warnings even if they import the .h file.

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

Sidebar

Related Questions

Instead of using an interface like this: public interface IStartable { void Start(); void
I would like to create a user interface like the iGoogle or facebook profiles
When I see code snippets like interface A { void a(); void b() default
Objective-C has directives like: @interface @implementation @end @protocol @property @synthesize I think of these
Assume I have a interface like: @interface it:NSObject { NSString* string; } @end @implement
If I have a method like: @interface CharacterSet + (NSArray *)allCharacterSets; @end Can I
Say I have a class like this: @interface MyAwesomeClass : NSObject { @private NSString
I am looking for a container which provides std::map like interface but maintains the
I am creating a program which has an installer-like interface. Is it better to
I am overloading operator << to implement a stream like interface for a class:

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.