A custom and simple UIButton subclass that glows when the user is touching down over the button.
另外,您也可以像创建正常的 UIButton 一样从代码中创建它
VAGlowingButton *button = [VAGlowingButton buttonWithType:UIButtonTypeCustom];
[button setTitle:@"Glowing" forState:UIControlStateNormal];
[button setTitleColor:[UIColor yellowColor] forState:UIControlStateNormal];
button.glowColor = [UIColor yellowColor];
glowColor 将其设置为 nil 将使按钮表现得像正常的 UIButton。
enableDefaultHighlighting 当设置为 false 时,默认 UIButton 突出显示行为将被禁用。默认值为 false。它只在没有设置发光颜色为非 nil 值时才有效。
VAGlowingButton 可以通过 CocoaPods 获得。要安装它,只需将以下行添加到您的 Podfile 中
pod "VAGlowingButton"
Mohamed Afifi,mohamede1945
VAGlowingButton 是基于 MIT 许可证提供的。查看 LICENSE 文件以获取更多信息。