草庐IT

bezierPathWithArcCenter

全部标签

ios - UIBezierPath bezierPathWithArcCenter 未正确居中

我有一个View,我想在其中用UIBezierPathbezierPathWithArcCenter画一个圆。我的view的initWithFrame如下:-(instancetype)initWithFrame:(CGRect)frame{self=[superinitWithFrame:frame];if(self==nil){returnnil;}self.circleLayer=[CAShapeLayerlayer];self.circleLayer.fillColor=UIColor.clearColor.CGColor;self.circleLayer.strokeColo