jjzjj

CGPathApply

全部标签

swift - 等同于或替代 Swift 中的 CGPathApply?

在pre-releasedocumentation似乎没有CGPathApply的Swift版本。是否有同等或替代品?我正在尝试获取CGPath的所有子路径,以便我可以从不同的起点重新绘制它。 最佳答案 swift3.0在Swift3.0中,您可以像这样使用CGPath.apply:letpath:CGPath=...//orletpath:CGMutablePathpath.apply(info:nil){(_,elementPointer)inletelement=elementPointer.pointeeletcommand

swift - 等同于或替代 Swift 中的 CGPathApply?

在pre-releasedocumentation似乎没有CGPathApply的Swift版本。是否有同等或替代品?我正在尝试获取CGPath的所有子路径,以便我可以从不同的起点重新绘制它。 最佳答案 swift3.0在Swift3.0中,您可以像这样使用CGPath.apply:letpath:CGPath=...//orletpath:CGMutablePathpath.apply(info:nil){(_,elementPointer)inletelement=elementPointer.pointeeletcommand