boo-urns
boo-urns

Reputation: 10376

Objective-C interface/implementation paradigm: what does it mean to have a method in implementation and NOT in the interface?

I'm trying to understand how access is enforced in Objective-C. I think I've got the basics, but recently I've realized that I don't understand what it means for a method to exist in the implementation but not in the interface. Does this mean that method is not private to the object?

Upvotes: 1

Views: 250

Answers (1)

Rob Napier
Rob Napier

Reputation: 299345

That would mean that the method is private to the object, at least by convention. There are no "enforceable" private methods in ObjC, but if the method does not appear in the interface, then no one else should be calling it (and it generates a compiler warning to try).

Upvotes: 4

Related Questions