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
  • 18,433
  • 17
  • 89
  • 142

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
  • 380,288
  • 84
  • 512
  • 473