iphone - Objective-C hidden instance variables -
this question has answer here:
hi i've seen 2 ways declare hidden instance variables in .m file 1)
@interface myclass() { //my ivars } @end @implementation myclass //my implementation @end
2)
@implementation myclass { //my ivars } //my implementation @end
confused difference between two, and/or coding conventions when comes this. help!
good question! tend see instance variables declared in interface
, implementation
works too. thoughts on issue:
- i think using
interface
better practice - i think ivars declared in
implementation
inaccessible subclasses
Comments
Post a Comment