Frame and Bounds of CAShapeLayer
问题 I am working on CAShapeLayer .And trying to draw non-linear path.I want to set frame to CAShapeLayer .So i can use CGPathGetPathBoundingBox method to get frame from CGPathRef . Here is code : CGMutablePathRef path = CGPathCreateMutable(); CGPathAddArc(path, NULL, rect.size.width/2, rect.size.height/2, 100, (0), (M_PI_2), NO); CGPathAddArc(path, NULL, rect.size.width/2, rect.size.height/2, 100-50, (M_PI_2), (0), YES); CGPathCloseSubpath(path); CAShapeLayer* arcLayer = [[CAShapeLayer alloc]init