Instance Method


Removes the specified obstacle from the graph.


func removeObstacles(_ obstacles: [GKPolygonObstacle])



An array of obstacle objects to be removed from the graph.


After removing obstacles, the GKObstacleGraph class automatically creates, removes, or rearranges nodes and edges where necessary to describe the navigable area around the complete collection of obstacles.

See Also

Working with Obstacles

var obstacles: [GKPolygonObstacle]

The list of obstacle objects in the graph, each of which describes a polygon-shaped impassable area.

func addObstacles([GKPolygonObstacle])

Adds new obstacles to the graph.

func removeAllObstacles()

Removes all obstacles from the graph.

func nodes(for: GKPolygonObstacle) -> [NodeType]

Returns the group of nodes corresponding to an obstacle in the graph.