Hi guys,
I was referencing one of my Objective-C books* and noticed that there were instance variables defined in the implementation section of a class. I assume because the users in the class don't need to know about the instance variables, just the interface file but it leads me to two questions:
1. When did this start? I'm pretty sure its new as I've never seen it before. (Some internet research suggests its new in Xcode 4.2, but I can't find anything in Apple's docs about it).
2. If it's Xcode only, wouldn't this be a bad way to do things since some other IDE's support Objective-C, but not necessarily putting the ivars in the implementation section?
The book is the newest version (4.0) of Steve Kochan's programming in Objective-C. I have and read the 2.0 version and the classes do not have ivars in the implementation section, but I couldn't find in the new version where this difference, and the reasoning behind it is mentioned.
I was referencing one of my Objective-C books* and noticed that there were instance variables defined in the implementation section of a class. I assume because the users in the class don't need to know about the instance variables, just the interface file but it leads me to two questions:
1. When did this start? I'm pretty sure its new as I've never seen it before. (Some internet research suggests its new in Xcode 4.2, but I can't find anything in Apple's docs about it).
2. If it's Xcode only, wouldn't this be a bad way to do things since some other IDE's support Objective-C, but not necessarily putting the ivars in the implementation section?
The book is the newest version (4.0) of Steve Kochan's programming in Objective-C. I have and read the 2.0 version and the classes do not have ivars in the implementation section, but I couldn't find in the new version where this difference, and the reasoning behind it is mentioned.