现在我这样做:
NodeList* elementsUsingTagG = [third_floor.DOMDocument getElementsByTagName:@"g"];
auds = [elementsUsingTagG.internalArray objectAtIndex:1];
SVGElement *elem = (SVGElement*)[third_floor.DOMDocument getElementById:hitLayer.name];
if ([auds.childNodes.internalArray containsObject:elem])
{
[self deselectTappedLayer];
lastTappedLayer = hitLayer;
if (lastTappedLayer != nil)
{
lastTappedLayer.opacity = 1.0f;
NSLog(@"Clicked on auditory %@, highlight it!", hitLayer.name);
}
}
我可以获得 SVGElement/CALayer/Node 的一些属性,它标识了这个元素所属的组吗?谢谢