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

posted @ 2017-06-30 18:23  jzdwajue  阅读(100)  评论(0编辑  收藏  举报