I've developed an iPhone application with some UIButtons. The problem is that when I hold down one of the buttons, the method assigned to the button is being called multiple times but since one of the actions is for deleting some files, the application tries to delete the file multiple times which is causing the application to crash because the file is deleted succesfully the first time the action is being called.
I've tried the following:
in the hope the button will be deactivated when the action is already being executed but this don't work...
Hope you guys can help me out
I've tried the following:
Code:
- (IBAction)actionButton {
[button1 setEnabled:NO];
// Some actions
[button1 setEnabled:YES];
}
Hope you guys can help me out