测试已测试 | ✗ |
语言语言 | Obj-CObjective C |
许可协议 | MIT |
发布时间最后发布 | 2016 年 4 月 |
由 Giuseppe Nucifora 维护。
依赖项 | |
PureLayout | >= 0 |
RZDataBinding | >= 0 |
要运行示例项目,请克隆仓库,然后首先从 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 文件。