1 application Binary restricted distribution Non-commercial use only Can modify source Read full license
Unlimited projects Source and binary distribution Commercial use allowed Can modify source Read full license
Starting from $ 6.99
UIAdvancedButton
UIAdvancedButton is a subclass of UIView which can be used to create glossy, 3D buttons with less than 2 lines of code. Customize the glow, shadow and colors the way you want with easy to use fully documented built-in methods.
Features
Overview You can customize the glow, shadow and colors with the built-in methods. To use this class add the QuartzCore.framework to your project.
Initializing a View Object
- initWithFrame: - initWithFrame:text:cornerRadius:buttonStyle:hasShadow:hasGlow: - initWithFrame:text:cornerRadius:backgroundColors:hasShadow:hasGlow:
Modifying a View Object
Returns a advanced button initialized with the specified frame with default label as "Label".
- (id)initWithFrame:(CGRect *)frame
Parameters
frame
The frame rectangle for the view, measured in points. The origin of the frame is relative to the superview in which you plan to add it. This method uses the frame rectangle to set the center and bounds properties accordingly.
Return Value An initialized Advanced Button object or nil if the object couldn't be created.
Description This method initializes and returns the Advanced button object with the specified size and position.
Returns an advanced button initialized with the specified frame and style.
- (id)initWithFrame:(CGRect *)frame text:(NSString *)text cornerRadius:(CGFloat *)radius buttonStyle:(UIAdvancedButtonStyle)style hasShadow:(BOOL)hasShadow hasGlow:(BOOL)hasGlow
Parameters
frame
The frame rectangle for the view, measured in points. The origin of the frame is relative to the superview in which you plan to add it. This method uses the frame rectangle to set the center and bounds properties accordingly.
text
The text to be displayed in the button.
radius
The radius of the corners to give round rect effect. Give 0 if you want a rectangular base.
style
The predefined button style. Instead of specifying colors for the button you can choose from any of the predefined style for the button being made.
Currently available styles are
UIAdvancedButtonStylePureBlack
UIAdvancedButtonStyleClassyBlue
UIAdvancedButtonStyleGrayMix
UIAdvancedButtonStyleGloxyGray
UIAdvancedButtonStyleTellyGreen
UIAdvancedButtonStyleRoyalRed
UIAdvancedButtonStyleRoyalGreen
UIAdvancedButtonStyleRoyalBlue
hasShadow
A BOOL which specifies whether the button will have a shadow.
hasGlow
A BOOL which specifies whether the button will have a glow or glossy effect.
Return Value
An initialized Advanced Button object or nil if the object couldn't be created.
Description
This method initializes and returns the Advanced button object with the specified size, position and style.
Returns an advanced button initialized with the specified frame and style.
- (id)initWithFrame:(CGRect *)frame text:(NSString *)text cornerRadius:(CGFloat *)radius backgroundColors:(NSArray *)colors hasShadow:(BOOL)hasShadow hasGlow:(BOOL)hasGlow
Parameters
frame
The frame rectangle for the view, measured in points. The origin of the frame is relative to the superview in which you plan to add it. This method uses the frame rectangle to set the center and bounds properties accordingly.
text
The text to be displayed in the button.
radius
The radius of the corners to give round rect effect. Give 0 if you want a rectangular base.
colors
A NSArray object which should contain one or more CGColorRef objects which define the background colors of the button.
hasShadow
A BOOL which specifies whether the button will have a shadow.
hasGlow
A BOOL which specifies whether the button will have a glow or glossy effect.
Return Value
An initialized Advanced Button object or nil if the object couldn't be created.
Description
This method initializes and returns the Advanced button object with the specified size, position and style.
Changes and animate the background color of the button from the current color to specified color.
- (void) animateToColors:(NSArray *)colors duration:(CGFloat)duration;
Parameters
colors
The colors to be applied to the background.
duration
The duration for which the animation should take place.
Description
This method changes the background color to colors specified in the color array and perform a transition animation for the specified duration.
Changes the font and color of the button text.
- (void)setTextFont:(UIFont *)font textColor:(UIColor *)color
Parameters
font
The font to be used for the displayed text.
color
The color to be used for the displayed text.
Description
This method changes the font and color of the displayed text.
Changes shadow radius and shadow color of the button.
- (void)setShadow:(BOOL)hasShadow shadowRadius:(CGFloat)radius shadowColor:(UIColor *)color
Parameters
hasShadow
A BOOL indicating whether to turn on or off the shadow of the button.
radius
The radius (spread of the shadow) to be used for the shadow.
color
The color to be used for the shadow.
Description
This method adds/remove the shadow of the button and changes the radius and color of the shadow if any.
Add or remove the glow effect of the button.
- (void)setGlow:(BOOL)hasGlow
Parameters
hasGlow
A BOOL indicating whether to turn on or off the glow of the button.
Description
This method adds/remove the glow or glossy effect of the button.
Add or remove the glow effect of the button.
- (void)setText:(NSString *)text
Parameters
text
The text of the button to be displayed.
Description
This method changes the text of the button to the string identified by the text variable.
Starting from $ 6.99
Questions & Comments
Leave a comment
Log-in now or register for a free account.