<!--
{
  "availability" : [
    "iOS: 3.2.0 -",
    "iPadOS: 3.2.0 -",
    "macCatalyst: 13.1.0 -",
    "tvOS: -",
    "visionOS: 1.0.0 -",
    "watchOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "UIKit",
  "identifier" : "/documentation/UIKit/UIBezierPath/contains(_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "c:objc(cs)UIBezierPath(im)containsPoint:"
  },
  "title" : "contains(_:)"
}
-->

# contains(_:)

Returns a Boolean value that indicates whether the specified point is within the region that the path encloses.

```
func contains(_ point: CGPoint) -> Bool
```

## Parameters

`point`

The point to test against the path, specified in the path object’s coordinate system.

## Return Value

<doc://com.apple.documentation/documentation/Swift/true> if the point is considered to be within the path’s enclosed area or <doc://com.apple.documentation/documentation/Swift/false> if it is not.

## Discussion

The receiver contains the specified point if that point is in a portion of a closed subpath that would normally be painted during a fill operation. This method uses the value of the [`usesEvenOddFillRule`](/documentation/UIKit/UIBezierPath/usesEvenOddFillRule) property to determine which parts of the subpath would be filled.

A point is not considered to be enclosed by the path if it is inside an open subpath, regardless of whether that area would be painted during a fill operation. Therefore, to determine mouse hits on open paths, you must create a copy of the path object and explicitly close any subpaths (using the [`close()`](/documentation/UIKit/UIBezierPath/close()) method) before calling this method.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)