要运行示例项目,请克隆仓库,然后在 Example 目录中首先运行 pod install
。
JLGradientViews 可通过 CocoaPods 获取。要安装它,只需将以下行添加到 Podfile 中
pod "JLGradientViews"
updateColor
或 updatePoint
来在视图中反映数据是很重要的。JLHorizontalGradientView *gradientView = [[JLHorizontalGradientView alloc] initWithFrame:CGRectMake(0, 0, 100, 100)];
gradientView.leftColor = [UIColor whiteColor];
gradientView.rightColor = [UIColor blackColor];
[gradientView updateColor];
[self.view addSubview:gradientView];
Joey Lee
JLGradientViews 在 MIT 许可证下可用。有关更多信息,请参阅 LICENSE 文件。