阅读背景:

如何在UICollectionView中设置梯度固定背景?

来源:互联网 

I used following code.

我用下面的代码。

CAGradientLayer* collectionRadient = [CAGradientLayer layer];
collectionRadient.bounds = self.collectionView.bounds;
collectionRadient.anchorPoint = CGPointZero;
collectionRadient.colors = [NSArray arrayWithObjects:(id)[startColor CGColor],(id)[endColor CGColor], nil];
[self.collectionView.layer insertSublayer:collectionRadient atIndex:0];
CAGradient



你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: