1

Possible Duplicate:
Protected methods in objective-c

I am a Java developer who is starting to have questions about Objective-C coding syntax.

As of right now, I only see +/- that denotes the Java public/private equivalents.

How would you implement a protected method in Objective-C?

Community
  • 1
  • 1
Tyler
  • 19,113
  • 19
  • 94
  • 151

1 Answers1

3

+/- indicates whether a method is a class method or an instance method -- not whether it is public or private.

In short, you can't declare a method as protected in Objective-C. Essentially every method is public, although if you don't declare a method in the header file, it is, in effect, private.

mipadi
  • 398,885
  • 90
  • 523
  • 479