Skip to content

powhu/LSButton

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LSButton

Long shadow button for iOS

Screenshot

Installation

Just copy LSButton.h,LSButton.m into your project.

Usage

With storyboard
Chnage the UIButton class to LSButton.
And set the image.

With code
There has a quick way to make a LSButton.

+ (LSButton *)buttonWithFrame:(CGRect)frame
                         icon:(UIImage*)icon
                  buttonColor:(UIColor*)buttonColor
                  shadowColor:(UIColor*)shadowColor
                    tintColor:(UIColor*)tintColor
                       radius:(CGFloat)radius
                        angel:(CGFloat)angel
                      target:(id)tar
                      action:(SEL)sel;

Change image color
LSButton always tint your image with tint color. So change the tint color.

Update button
If you change properties after drawRect:
You need call setNeedDisplay to update the view.

About

Long shadow button for iOS

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published