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.
}
}
私は何をすべきか?