Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
SVGKit で遊んでいると、次のようなコードを使用して、多かれ少なかれ自分の道を見つけることができます。
CALayer *layer; layer=[svgView.document layerWithIdentifier:@"path1730"];
しかし、これは、見たいレイヤーの識別子を知っているときです。ドキュメント内のすべての識別子 (レイヤー) のリストを取得する方法はありますか?
svgView.document.layerTreeサブレイヤーのルートである を参照します。すべてのサブレイヤーを取得するには、サブレイヤーを再帰的に下降する必要があります。または、単一SVGPathViewの から作業している場合は、そのenumerateChildLayersUsingBlock:メソッドを使用して、ビュー内の各サブレイヤーで動作するブロックを渡すことができます。
svgView.document.layerTree
SVGPathView
enumerateChildLayersUsingBlock: