我有三個IBActions,每個像這樣它自己的按鈕鏈接:如何使用IBAction爲按鈕之外它的範圍
#import "Controller.h"
#import "Application.h"
@implementation Controller
- (IBAction)deal:(id)sender {
NSButton *deal = (NSButton *)sender;
...
}
- (IBAction)hit:(id)sender {
NSButton *hit = (NSButton *)sender;
...
}
- (IBAction)stay:(id)sender {
NSButton *stay = (NSButton *)sender;
...
}
@end
如何使用/電話上的按鈕之外它的範圍是什麼?我正在尋找這樣的事情:
- (IBAction)hit:(id)sender {
NSButton *hit = (NSButton *)sender;
...
[hit setEnabled: NO];
[stay setEnabled: NO]; // Using/altering "Stay's" button
}
在此先感謝!
完美!謝謝。 – Simon