我有一个有很多房间的楼层方案,我必须让每个房间都可以点击,并且洞计划必须是可以恢复的。我用Bezier路径绘制每个房间,一个房间看起来像这样
`UIBezierPath *path;
// —----------------------------
path = [[UIBezierPath alloc] init];
path.lineWidth = lineWidth;
// Color
[pathColor setObject: [UIColor colorWithRed:0.1686275 green:0.1647059 blue:0.1607843 alpha:1] forKey: [NSNumber numberWithInt:path.hash]];
// Color
[pathData setObject: [NSNumber numberWithInt:0] forKey: [NSNumber numberWithInt:path.hash]];
// Move
[path moveToPoint:CGPointMake(292.3275,287.8195)];
// Line
[path addLineToPoint:CGPointMake(292.3275,288.115)];
// Line
[path addLineToPoint:CGPointMake(291.0615,288.1695)];
// Line
[path addLineToPoint:CGPointMake(292.3275,288.4105)];
// Line
[path addLineToPoint:CGPointMake(292.3275,288.692)];
// Line
[path addLineToPoint:CGPointMake(290.8125,288.3755)];
// Line
[path addLineToPoint:CGPointMake(290.8125,287.931)];
// Line
[path addLineToPoint:CGPointMake(291.874,287.8845)];
// Line
[path addLineToPoint:CGPointMake(290.8125,287.368)];
// Line
[path addLineToPoint:CGPointMake(290.8125,286.918)];
// Line
[path addLineToPoint:CGPointMake(292.3275,287.2355)];
// Line
[path addLineToPoint:CGPointMake(292.3275,287.52)];
// Line
[path addLineToPoint:CGPointMake(291.071,287.221)];
[path closePath];
[pathArray addObject:path];`
孔底显示正常,但调整大小非常缓慢且有毛病,有没有办法可能只调整位,这是可见的?或者也许我从一开始就做错了。