我正在尝试在 iOS 中画四分之一圆。在Mac OS中,似乎你可以使用appendBezierPathWithArcWithCenter,但这似乎在iOS中不起作用。
有谁知道如何在iOS中简单地画四分之一圆?
Thanks
有两种 iOS 等效项,一种用于UIBezierPath
和一个用于CGPath
:
UIBezierPath
相等的
UIBezierPath *path = [UIBezierPath bezierPath];
[path addArcWithCenter:centerPoint
radius:radius
startAngle:startAngle
endAngle:endAngle
clockwise:YES];
CGPath
相等的
CGMutablePathRef path = CGPathCreateMutable();
CGPathAddArc(path, NULL,
centerPoint.x, centerPoint.y,
radius,
startAngle,
endAngle,
NO); // clockwise
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)