While I hate to beat a horse to death on this subject (I\'ve read through various articles about this), but would just like to get more opinions on this matter before I create m
I would use a class extension, definitely. In the implementation file, include something like this above your @implementation
:
@interface A ()
- (void) doErrorChecking;
@end
Then use the method in code as needed. Although due to objective-c's dynamic nature no method is truly private, this will obscure the method from your interface file while still technically including it in your own 'private' interface. In general, keep your .h
file for methods and properties that are ok for public use, while limiting private use methods and properties to a class extension in the implementation file.