LSButton
Long shadow button for iOS
Install / Use
/learn @powhu/LSButtonREADME
LSButton
Long shadow button for iOS
<img src="./sample.gif" alt="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.
Related Skills
node-connect
341.6kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
84.6kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
341.6kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
commit-push-pr
84.6kCommit, push, and open a PR
