iphone Programming Glossary: linelayer
Animating the drawing of a line http://stackoverflow.com/questions/10603391/animating-the-drawing-of-a-line of a line I'm trying to animate the drawing of a line by the following way .h CAShapeLayer rootLayer CAShapeLayer lineLayer CGMutablePathRef path .m path CGPathCreateMutable CGPathMoveToPoint path nil self.frame.size.width 2 100 260 CGPathAddLineToPoint.. CGPathCloseSubpath path self.rootLayer CALayer layer rootLayer.frame self.bounds self.layer addSublayer rootLayer self.lineLayer CAShapeLayer layer lineLayer setPath path lineLayer setFillColor UIColor redColor .CGColor lineLayer setStrokeColor UIColor.. CALayer layer rootLayer.frame self.bounds self.layer addSublayer rootLayer self.lineLayer CAShapeLayer layer lineLayer setPath path lineLayer setFillColor UIColor redColor .CGColor lineLayer setStrokeColor UIColor blueColor .CGColor lineLayer..
|