首页 > 代码库 > iOS buttonset Enable or Disable

iOS buttonset Enable or Disable

在 .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

iOS buttonset Enable or Disable