VAGlowingButton 1.0.2

VAGlowingButton 1.0.2

测试已测试
Lang语言 Obj-CObjective C
许可证 MIT
发布最后发布2015 年 6 月

Mohamed Afifi 维护。



  • 作者:
  • Mohamed Afifi

A custom and simple UIButton subclass that glows when the user is touching down over the button.

使用方法

界面构建器
  1. 拖放一个 UIButton。
  2. 从标识检查器中将类名更改为 "VAGlowingButton"。 Step 2
  3. 选择一个发光颜色。 Step 3
  4. 通过设置高亮属性,您可以在界面构建器中看到效果。 IBDesignable
代码方式

另外,您也可以像创建正常的 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 值时才有效。

屏幕截图

正常 Normal 自定义 UIButton Custom 系统 UIButton System

安装

VAGlowingButton 可以通过 CocoaPods 获得。要安装它,只需将以下行添加到您的 Podfile 中

pod "VAGlowingButton"

作者

Mohamed Afifi,mohamede1945

许可证

VAGlowingButton 是基于 MIT 许可证提供的。查看 LICENSE 文件以获取更多信息。