在 .h 文件里:
@property (retain, nonatomic) IBOutlet UIButton *btnMyButton;
在函数方法中:
btnMyButton.enabled = NO; // disable my button btnMyButton.enabled = YES; // enable my button
转载自:
http://stackoverflow.com/questions/9012100/enable-disable-a-button-in-xcode-4-2
时间: 2024-10-28 14:16:43