包含加载状态的 UIButton
CrLoadingButton 通过 CocoaPods 提供。要安装它,只需将以下行添加到 Podfile
pod "CrLoadingButton"
然后运行
$ pod install
- (void)addButton
{
button.hideButtonWhenActive = true;
[button setDidSelect:^(CrLoadingButton *button) {
button.active = true;
[self performSelector:@selector(endButton:) withObject:button afterDelay:1];
}];
}
- (void)endButton:(CrLoadingButton *)button
{
button.active = false;
}
skswhwo, [email protected]
CrLoadingButton 在 MIT 许可下可用。更多信息见 LICENSE 文件。