Вы можете использовать CGPathApply
для проверки полного пути:
typedef struct {
CGPoint origin;
BOOL found;
} MySearchData;
void MyApplierFunction (void* info, const CGPathElement* element) {
MySearchData* searchData = (MySearchData *) info;
if (! searchData->found) {
searchData->origin = element->points[0];
searchData->found = YES;
}
}
CGPoint GetPathOrigin (CGPathRef path) {
MySearchData searchData = { CGPointZero, NO };
CGPathApply(path, (void *) &searchData, &MyApplierFunction);
return searchData.origin;
}