Gradient in UIView inside UITableViewCell changed after scroll
问题 I have set a gradient color to UIView inside my UITableViewCell . Everything works fine in the first load but after scroll, the gradient color is loaded again and change the position every time than the actual set condition. Here's my code for implementing gradient color : what should I do? Add Gradient Layer func gradient(frame:CGRect,colors: [CGColor]) -> CAGradientLayer { let layer = CAGradientLayer() layer.frame = frame layer.startPoint = CGPoint(x: 1.0, y: 0.0) layer.endPoint = CGPoint(x