#import "UIButton+ANDYHighlighted.h"
UIButton *button = [UIButton buttonWithType:UIButtonTypeCustom];
[button setBackgroundColor:[UIColor redColor]];
[button setHighlightedBackgroundColor:[UIColor grayColor]];
[button setTitleColor:[UIColor whiteColor]];
[button setHighlightedTitleColor:[UIColor redColor]];
UIButton-ANDYHighlighted 通过 CocoaPods 提供。要安装它,只需在Podfile中添加以下行:
pod 'UIButton-ANDYHighlighted'
Elvis Nuñez, [email protected]
UIButton-ANDYHighlighted 可在MIT许可证下使用。有关更多信息,请参阅LICENSE文件。