-5

I want a particular UIButton to change colour once a UISwitch move from OFF to ON. What do I enter

- (IBAction) Court1ON {
//here
}

to refer to a specific UIButton in my storyboard?

4

1 回答 1

0

You have several possibilities to do that:

  1. assign a tag to your button in storyboard; then access the button through:

    [self.view.viewByTag:buttonTag];
    
  2. create an IBOutlet @property of type UIButton and bind that to your button.

于 2013-02-24T09:36:19.857 回答