Why do people use
@interface ViewController : UIViewController
{
@private
UIButton* button_;
}
@ private ads in public headers? Declaring a variable inside an implementation gives the same result, doesn't it? It seems strange to me, I thought that the public heading should contain only public members. What to do with protected members?
@implementation ViewController
UIButton* button_;
@end
The only difference I know about is that this variable is visible only inside the current compilation unit (.m file, right?)
Is the same true for methods? I could compile everything with the correct ordering of methods or forward declarations. Why do people want to declare categories for private methods? Only for testing?
source
share