当我按下 时,我的应用中有两个按钮(比如Btn1和) ,Btn2Btn1Btn2),可用于用户交互和执行操作。这没有问题。
现在的问题是,
我希望按钮恢复到开始时的默认状态(当我按下Btn1``Btn2启用用户交互并执行操作时)
任何帮助表示赞赏。
这是代码:
- (IBAction)Btn1:(id)sender;
{
// if the Btn1 pressed enable the Btn2
if (...)
{
button.enabled = YES;
}
}
- (IBAction)Btn2:(id)sender;
{
if (button.enabled == YES)
// do any action in here
}
}