ARC, Core Graphics , C, NSCoding, Objective-C.
/, , Objective-C NSCoding. CGMutablePathRef , Objective-C, Core Graphics.
UIBezierPath - Objective-C CGPath, .
:
CGMutablePathRef mutablePath = CGPathCreateMutable();
CGPathRef persistentPath = CGPathCreateCopy(mutablePath);
UIBezierPath * bezierPath = [UIBezierPath bezierPathWithCGPath:persistentPath];
CGPathRelease(persistentPath);
[aCoder encodeObject:bezierPath];
:
UIBezierPath * bezierPath = [aCoder decodeObject];
if (!bezierPath) {
bezierPath = [UIBezierPath bezierPath];
}
CGPathRef path = [bezierPath CGPath];
CGMutablePathRef * mutablePath = CGPathCreateMutableCopy(path);
.