addObstacles(_:)
Adds new obstacles to the graph.
Declaration
func addObstacles(_ obstacles: [GKPolygonObstacle])Parameters
- obstacles:
An array of obstacle objects to be added to the graph.
Discussion
Adding a new obstacle to the graph has the same effect as if that obstacle were present when creating the graph—that is, the GKObstacleGraph class automatically creates new nodes and edges where necessary to describe the navigable area around the complete collection of obstacles.