---
title: "contains(_:)"
framework: quartzcore
role: symbol
role_heading: Instance Method
path: "quartzcore/calayer/contains(_:)"
---

# contains(_:)

Returns whether the receiver contains a specified point.

## Declaration

```swift
func contains(_ p: CGPoint) -> Bool
```

## Parameters

- `p`: A point in the receiver’s coordinate system.

## Return Value

Return Value true if the bounds of the layer contains the point.

## See Also

### Hit testing

- [hitTest(_:)](quartzcore/calayer/hittest(_:).md)
