GradientButton 0.2.5

GradientButton 0.2.5

测试已测试
语言语言 Obj-CObjective C
许可协议 MIT
发布时间最后发布2016 年 4 月

Giuseppe Nucifora 维护。



 
依赖项
PureLayout>= 0
RZDataBinding>= 0
 

  • Giuseppe Nucifora

使用方法

要运行示例项目,请克隆仓库,然后首先从 Example 目录运行 pod install

要求

安装

GradientButton 可通过 CocoaPods 获得。要安装,请简单地将以下行添加到您的 Podfile 中

pod "GradientButton"
GradientButton *button = [[GradientButton alloc] initWithFrame:CGRectMake(0, 0, 200, 50)];
[button setCenter:self.view.center];
[button setTitle:@"Normal Button" forState:UIControlStateNormal];
[button setTitleColor:[UIColor blackColor] forState:UIControlStateNormal];
[button setbackgroundLayerWithColors:@[[UIColor redColor],[UIColor blueColor]] startPoint:CGPointMake(0, 0)];

[self.view addSubview:button];

GradientButton *autoLayoutButton = [GradientButton newAutoLayoutView];

[autoLayoutButton setTitle:@"Autolayout Button" forState:UIControlStateNormal];
[autoLayoutButton setTitleColor:[UIColor blackColor] forState:UIControlStateNormal];
[autoLayoutButton setbackgroundLayerWithColors:@[[UIColor redColor],[UIColor greenColor],[UIColor whiteColor]] startPoint:CGPointMake(0, 0)];

[self.view addSubview:autoLayoutButton];

作者

Giuseppe Nucifora,[email protected]

许可协议

GradientButton 在 MIT 许可协议下可用。有关更多信息,请参阅 LICENSE 文件。