# `GSShapeGroup containsShape:`

*Instance Method*

Returns whether the given shape is a member of the group.

## Declaration

```swift
func containsShape(_ shape: GSShape) -> Bool
```

```objc
- (BOOL) containsShape:(GSShape *) shape;
```

```python
containsShape_(shape: GSShape) -> bool
```

## Discussion

> **Complexity**
> O(log(*n*)) where *n* is the number of members of the group. O(*n*) when the group or shape has a layer of `nil`.

## See Also

### Membership

- [`GSShapeGroup depthOfShape:`](/Core/GlyphsCore/GSShapeGroup/depthOfShape:) — Returns the relative depth of the shape within the group.
- [`GSShapeGroup groupIndexRange`](/Core/GlyphsCore/GSShapeGroup/groupIndexRange) — The range of layer shape indices that includes all group members and the index of the group shape itself (which is always at the last index of the range).

