-
(UIImageView )smallBackgroundImageView {
if(!_smallBackgroundImageView)
{
_smallBackgroundImageView = [[UIImageView alloc] initWithFrame:CGRectMake(12,FULL_WIDTH207/375+5+147.5+10, FULL_WIDTH-12*2, (FULL_WIDTH-24)*90/351)];
[_smallBackgroundImageView addCornerWithCornerRadius:20.0/2];
_smallBackgroundImageView.backgroundColor = [UIColor clearColor];CAGradientLayer *gradientLayer = [CAGradientLayer layer]; gradientLayer.colors = @[(__bridge id)((BGColorHex(F7391F)).CGColor), (__bridge id)((BGColorHex(FE6B56)).CGColor)]; gradientLayer.startPoint = CGPointMake(0.5, 0); gradientLayer.endPoint = CGPointMake(0.5, 1); gradientLayer.frame = CGRectMake(0, 0, FULL_WIDTH-12*2, (FULL_WIDTH-24)*90/351); [_smallBackgroundImageView.layer addSublayer:gradientLayer];
}
return _smallBackgroundImageView;
}
添加渐变色
最新推荐文章于 2024-08-29 20:20:00 发布