1

I have a CCButton declared in Status.m - it is created via a code connection in SpriteBuilder:

@implementation Status
{
    CCButton *_button;
}

The method block is called when the button is pressed -- in this method I'd like to disable further interaction with the button.

- (void)block
  {
      // Disable user interaction
  }

I cannot find how to do disable this with in the built-in methods!

H K
  • 1,215
  • 2
  • 16
  • 29

1 Answers1

2

Using the CCControl.enabled property should do it:

- (void)block
{
    _button.enabled = NO;
}
trojanfoe
  • 120,358
  • 21
  • 212
  • 242