我使用 Interface Builder 制作了一个按钮并将其链接到一个动作。我想禁用下面语句中的点击按钮。if
- (IBAction)hit:(id)sender {
Application *app = [[Application alloc] init];
int nc = [app dealCard];
[userOne setIntValue:tu];
[userTwo setIntValue:nc];
tu += nc;
[totalUser setIntValue:tu];
BOOL bust = [app checkBust:tu];
if (bust == YES) {
[console setIntValue:1];
//Disable button here.
}
}
我应该怎么办?