Enable sender button from another button? xcode 4
I have 2 buttons wired up to an IBOutlet calling a standard id sender method. I'm able to disable current sender from within the target, but I can't seem to affect the other button (the one that isn't the sender).
I've found answers for UIButtons but not IBAction id sender buttons?
//DISABLE开发者_Python百科 BUTTON_1
((UIButton *)sender).enabled = NO;
ok, that disables button_1, now how do I enable it from button_2?
You can't enable button_1 from the button_2's IBAction unless you have a reference to button_1 somewhere -- for example if your button_1 is hooked up to an IBOutlet name button_1, then you could do something like: button_1.enabled = YES;
.
精彩评论