IBActions
are simply of type void
. However, you would want to use IBAction
instead for the sake of Interface Builder.
Interface Builder is the integrated service in Xcode you use to design your application, and attach the layout to code. Interface Builder 'knows' what you want to connect because they are of one of those two types. Once you define your IBOutlet
or IBAction
in your code, you literally drag and drop to connect it to something in Interface Builder. You can use an IBAction, for example, if you want to make a touch event listener (or something along those lines).
You can read more about IBOutlets
and IBActions
from the Apple Developer page on the topic at https://developer.apple.com/library/mac/#documentation/General/Conceptual/Devpedia-CocoaApp/TargetAction.html (It's an article for OS X developers, but it still applies to iOS since the two are built very similar frameworks).