Adding methods to an Objective C class interface is optional?

Posted by Steve the Plant on Stack Overflow See other posts from Stack Overflow or by Steve the Plant
Published on 2010-03-17T13:37:45Z Indexed on 2010/03/17 13:41 UTC
Read the original article Hit count: 230

Filed under:
|
|
|
|

Coming from a C++ background, one thing that confuses me about Objective C is the fact that you can add a method to a class without actually specifying it in the class interface. So I had a barrage of questions:

  1. Why would someone choose to not add the method in the class interface?
  2. Is it simply because of visibility?
  3. Methods without a declaration in the interface are private?
  4. Is declaring methods in a class interface just optional?
  5. Is it different for overriding a base class' method?

© Stack Overflow or respective owner

Related posts about objective-c

Related posts about cocoa