我有一個場景,爲UIView中最近的CGPoint的羣集。所以我必須設置CGPoint的NSArray,我試圖讓最近的值,做集羣,但我無法得到的邏輯: //我的代碼 for (CGPoint firstObjOfCGPoint in cgPointGroupArray) {
for (CGPoint nextPoint in cgPointGroupArray) {
for (CALayer *layer in self.view.layer.sublayers) {
if ([layer isKindOfClass:[CAShapeLayer class]]) {
CAShapeLayer *copy = (CAShapeLayer *)layer;
if ([copy.name isEqualToString:@"dat