iphone - Objective-C hidden instance variables -


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:

  1. i think using interface better practice
  2. i think ivars declared in implementation inaccessible subclasses

Comments

Popular posts from this blog

c# - Send Image in Json : 400 Bad request -

jquery - Fancybox - apply a function to several elements -

An easy way to program an Android keyboard layout app -