So I'm making a simple application that acts on a button. There are 8 other buttons in a circle and when the button is pressed each button for 60 milliseconds will disable and then re-enable in order, so it looks like it makes a circle.
All the logic for the enabling/disabling are in "void" functions, but it seems that I cannot call that function within an IBAction..
Is it possible to do so? I've been googling around and I haven't seen anything like it.
Example:
and so on..
Note: What HAS worked was associating that function using the Interface Builder to the button.. but I was just wondering if I can do this with code instead of the GUI and I want to use other functions after the function finishes.
Any helps appreciated! :3
-Retro
All the logic for the enabling/disabling are in "void" functions, but it seems that I cannot call that function within an IBAction..
Is it possible to do so? I've been googling around and I haven't seen anything like it.
Example:
Code:
- (IBAction) activateButton:(id)sender{
void beginCircleBusy();
}
- (void) beginCircleBusy:(id)sender{
firstButton.enabled = NO;
[NSTimer scheduledTimerWithTimeInterval: .06 target:self selector:@selector(goToSecondButton:) userInfo: nil repeats:NO];
}
and so on..
Note: What HAS worked was associating that function using the Interface Builder to the button.. but I was just wondering if I can do this with code instead of the GUI and I want to use other functions after the function finishes.
Any helps appreciated! :3
-Retro
Last edited: