<!--
{
  "availability" : [
    "iOS: 7.0.0 -",
    "iPadOS: 7.0.0 -",
    "macCatalyst: 13.1.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "UIKit",
  "identifier" : "/documentation/UIKit/NSTextContainer/exclusionPaths",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "c:objc(cs)NSTextContainer(py)exclusionPaths"
  },
  "title" : "exclusionPaths"
}
-->

# exclusionPaths

An array of path objects that represents the regions where text doesn’t display in the text container.

```
var exclusionPaths: [UIBezierPath] { get set }
```

## Discussion

The default value of this property is an empty array. Depending on the platform, you can assign an array of <doc://com.apple.documentation/documentation/AppKit/NSBezierPath> or [`UIBezierPath`](/documentation/UIKit/UIBezierPath) objects to exclude text from one or more regions in the text container’s bounds. When the layout manager proposes a line fragment rectangle intersecting one of the regions defined by the exclusion paths, the text container returns an adjusted line fragment rectangle excluding that region.

## See Also

[`func lineFragmentRect(forProposedRect: CGRect, at: Int, writingDirection: NSWritingDirection, remaining: UnsafeMutablePointer<CGRect>?) -> CGRect`](/documentation/UIKit/NSTextContainer/lineFragmentRect(forProposedRect:at:writingDirection:remaining:))

Returns the bounds of a line fragment rectangle inside the text container for the proposed rectangle.



---

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)