使用CAShapeLayer与UIBezierPath可以实现不在view的drawRect方法中就画出一些想要的图形步骤:1、新建UIBezierPath对象bezierPath2、新建CAShapeLayer对象caShapeLayer3、将bezierPath的CGPath赋值给caShapeLayer的path,即caShapeLayer.path =bezierPath.CGPath4、把caShapeLayer添加到某个显示该图形的layer中下面的小例子是一个环形的progress代码,有具体的使用方法.h文件:[cpp]view plaincopy#import#import@ Read More
posted @ 2014-04-10 11:36 leevaboo Views(175) Comments(0) Diggs(0) Edit