#import "UIButton+My.h"
#import <QuartzCore/QuartzCore.h>
@implementation UIButton (My)
-(void)fade :(BOOL)enable{
self.enabled=enable;//
self.alpha=enable?1.0:0.5;
}
@end
.h:
#import <UIKit/UIKit.h>
@interface UIButton (My)
-(void)fade :(BOOL)enable;
@end