hi guys,
referencing 1 of objective-c books* , noticed there instance variables defined in implementation section of class. assume because users in class don't need know instance variables, interface file leads me 2 questions:
1. when did start? i'm pretty sure new i've never seen before. (some internet research suggests new in xcode 4.2, can't find in apple's docs it).
2. if it's xcode only, wouldn't bad way things since other ide's support objective-c, not putting ivars in implementation section?
book newest version (4.0) of steve kochan's programming in objective-c. have , read 2.0 version , classes not have ivars in implementation section, couldn't find in new version difference, , reasoning behind mentioned.
maybe post code of mean ? sure these "instance" variables ?
usually, when doing methods, it's make them "private". variables, can in interface section using @private directive, no need stick them in implementation file.
however, use variables in implementation files, global symbol. these use "class variables", variables survive , accessible instances of class or class methods.
Forums Macs Mac Programming
- iPhone
- Mac OS & System Software
- iPad
- Apple Watch
- Notebooks
- iTunes
- Apple ID
- iCloud
- Desktop Computers
- Apple Music
- Professional Applications
- iPod
- iWork
- Apple TV
- iLife
- Wireless
No comments:
Post a Comment