I just started to learn objective-c and one thing is not clear for me
Ok i have a button in InterFace Builder. I my .h file i have the code;
- (void)startButtonPressed:(id)sender;
How i can 'link' the 'void' to my button to do the action?
Code here is not working how do i need to do that?
- (void)startButtonPressed:(id)sender {
//Some stuff in here
}
Does anyone know how to fix this problem?
IBAction, in fact, isvoidhttp://www.cocoadev.com/index.pl?IBAction
It is given so, you won’t mess up actions coming from UI and functions of your class implementation.
To create function connectable with UI, you need to set its type to
IBActionwhich is coorect, as well as
The type in implementation, can be
voiddirectly