What is the difference between putting pseudo-private instance variables in a class extension inside a .m file or putting them in newly entered @implementation brackets, as shown below?
Are there any consequences, pluses, minuses on one way or another? Is inner2 handled differently than internal3, what should a programmer do? (Of course, there is a difference Mackay talked about, but the question is if you care in practice or not).
// MyClass.m @interface MyClass () { id internal2; } @end @implementation MyClass { id internal3; } - (void)internalMethod { NSLog(@"%@ %@", internal2, internal3); } @end
source: http://www.mcubedsw.com/blog/index.php/site/comments/new_objective-c_features/
, , ivar @implementation, , @implementation .m( @ ( )). , "private" ivars:
, MyClass - UIView. UIView.h - , , UIView + Private.h - "private", Apple , UIView.m , , UIView. .
ivars , , . , - , , , .