VAGlowingButton 1.0.2

VAGlowingButton 1.0.2

TestsTested
LangLanguage Obj-CObjective C
License MIT
ReleasedLast Release Jun 2015

Maintained by Mohamed Afifi.



  • By
  • Mohamed Afifi

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

Usage

Interface builder:
  1. Drag and drop a UIButton.
  2. Change the class name to "VAGlowingButton" from identity inspector. Step 2
  3. Choose a glowing color. Step 3
  4. You can see the effect in interface builder by setting the highlight property. IBDesignable
Programmatically:

Alternatively, you can create it from code just as you create a normal UIButton:

VAGlowingButton *button = [VAGlowingButton buttonWithType:UIButtonTypeCustom];
[button setTitle:@"Glowing" forState:UIControlStateNormal];
[button setTitleColor:[UIColor yellowColor] forState:UIControlStateNormal];
button.glowColor = [UIColor yellowColor];

Properties

glowColor Setting it to nil makes the button behave as normal UIButton.

enableDefaultHighlighting When set to false, the default UIButton highlighting behavior becomes disabled. Default value is false. It only works if there is a glow color set to non-nil value.

Screenshots

Normal Normal Custom UIButton Custom System UIButton System

Installation

VAGlowingButton is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod "VAGlowingButton"

Author

Mohamed Afifi, mohamede1945

License

VAGlowingButton is available under the MIT license. See the LICENSE file for more info.