【文件属性】:
文件名称:多款按钮样式效果案例
文件大小:162KB
文件格式:ZIP
更新时间:2021-04-04 10:09:09
IOS源码
这个源码案例是一个比较不错的多款按钮样式效果案例,源码BZAnimationButton,BZAnimationButton提供多款按钮样式,样式变换的时候能够展现通过简单的动画变换。按钮的属性也能够高度自定义。
使用方法:
BZAnimationButton支持CocoaPods.
也可以直接复制BZAnimationButton文件夹到自己的项目中。
#import "BZAAnimationButton.h"
BZAAnimationButton *button1 = [[BZAAnimationButton alloc] init];
button1.frame = CGRectMake(10, 170, 35, 35);
[button1 setLayerLineLength:30];
button1.backgroundColor = [UIColor whiteColor];
button1.tag = AnimationButtonStyleArrowRight;
[button1 addTarget:self action:@selector(onButton1Click:) forControlEvents:UIControlEventTouchUpInside];
[self.view addSubview:button1];
[button1 setStyle:AnimationButtonStyleArrowRight withAnimation:NO];
可以通过改变tag属性来改变一个按钮的样式。
详细请参考demo.