如何设置清晰的拇指背景UISlider以使轨道在拇指后面不可见?
当我使用setThumbImage:forState:并传递部分透明图像时,滑块的最小轨道和最大轨道图像/颜色在拇指图像后面可见:
我希望它看起来像在 iOS 相机应用程序中,其中“透明”拇指图像圆圈剪辑轨道背景颜色:
我用这段代码画了一个图:
CAShapeLayer *curentGraph = [CAShapeLayer new];
CGMutablePathRef linePath = CGPathCreateMutable();
curentGraph.lineWidth = 3.0f;
curentGraph.fillColor = [[UIColor clearColor] CGColor];
curentGraph.strokeColor = [colorGraph CGColor];
for (NSValue *value in arrOfPoints) {
CGPoint pt = [value CGPointValue];
CGPathAddLineToPoint(linePath, NULL, pt.x,pt.y);
};
curentGraph.path = linePath;CGPathRelease(linePath);
[self.layer addSublayer:curentGraph];
Run Code Online (Sandbox Code Playgroud)
它看起来像这样

但我有一个问题.我需要为图形显示动画.每个点都应该从位置向上移动y = 0到y = pt.y.就像他们在本网站的图表中所做的那样.
如何为我的图形设置动画?