Given that iOS SDK 6.1 is used in Xcode 4.6.3 , does it make a difference to declare the method signature of IBAction
in a header file or not?
Without putti
The entire point of an IBAction
method is to be a public connection point in Interface Builder (using Storyboards or not).
The word IBAction
itself is #define
d as void
. Its only purpose (and the same is true of IBOutlet
) is to allow Xcode to scan your code and find these points where your controller needs to be wired up views via IB. You don't need the IBAction
part of the declaration if you're programmatically connecting a control to that method.
There's no performance difference, but semantically, putting an IBAction
in your implementation file doesn't really make sense. Having an IBAction
means the controller is communicating to an outside object via that method, and that's exactly what header/public @interface
declarations are for.