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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T10:40:56+00:00 2026-06-12T10:40:56+00:00

According to Apple’s Objective-C specification, all unmarked instance variables are @protected . I have

  • 0

According to Apple’s Objective-C specification, all unmarked instance variables are @protected. I have found no information to say which directive is the default for methods; are they @protected, @private, or @public?

  • 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-12T10:40:58+00:00Added an answer on June 12, 2026 at 10:40 am

    Those specifications have no applicability to methods. Methods work quite differently from ivars in ObjC. Specifically, one does not actually call a method. One sends a message. The object then interprets the message and takes some action. The usual action is to run the method that has the same name as the sent message, but there are other options.* Another common one is to throw an exception because the object can’t figure out what else it should do with the message. This dispatch step is fundamental to ObjC, and it means that methods cannot truly be private.

    Any message can be sent to any object,** and thus any method that exists on an object can be run at runtime.

    It is possible to declare pseudo-private methods in class extensions or categories, such that a particular translation unit doesn’t see it. Then you’ll get a compiler warning or error when you try to send the corresponding message, but it’s still possible (via performSelector: and variants, or using objc_msgSend() directly), to run the “private” method.


    *Such as those presented in the Runtime Programming Guide under Dynamic Method Resolution and Message Forwarding.

    **With the caveat that, when compiling under ARC and using the bracket syntax, [obj message], the compiler has to have seen a declaration of a method with that name for an object of that type, but that’s another question.

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

Sidebar

Related Questions

According to Apple's Objective C guide, methods with the same name all use the
According to Apple documentation and other documentation I have read about on disk encryption
I have MAC OS 10.6 (Snow Leopard) and according to Apple's guide on HTTP
According to Apple one should have 2 controllers and 2 nibs in order to
I have an app where the navigationBar is implemented according to Apple HIG, so
i have a application i put Default.png for splash screen according to apple's documentation.the
According to Apple's description, the aurioTouch sample app is suppose to get the audio
According to apple my application has to be able to run in both portrait
According to Apple's docs, Subclasses need not override -[UIView drawRect:] if the subclass is
According to Apple , the iPhone 4 has a new and better screen resolution:

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.