I notice that normal practice is to declare IBAction methods in the header file. I have also noticed that it is not necessary to do so for Interface Builder to recognise the IBAction methods and allow me to link them to controls. So what is the purpose of declaring the IBAction method in the header file?
Asked
Active
Viewed 793 times
1 Answers
2
There is no good reason, unless you have a good reason to expose them to others -or- if you need to open the nibs in Interface Builder.app.
Some people may do it for historical reasons, or out of habit. Prior to Xcode 4, there was a separate app to edit nibs (Interface Builder). Interface Builder was not backed by a compiler in the way you know it in Xc4; It just used a basic objc parser to interpret headers. Over time, it learned to communicate with Xcode. In earlier days, you had to drag and drop headers to sync them ;)

justin
- 104,054
- 14
- 179
- 226