---
title: "byDifference(from:)"
framework: uikit
role: symbol
role_heading: Instance Method
path: "uikit/uiregion/bydifference(from:)"
---

# byDifference(from:)

Returns a new region created by subtracting the specified region from the current region.

## Declaration

```swift
func byDifference(from region: UIRegion) -> Self
```

## Parameters

- `region`: The region to be subtracted from the current region.

## Return Value

Return Value A new region that contains the points that are in the current region and not in the area defined by the region parameter.

## See Also

### Creating complex regions

- [inverse()](uikit/uiregion/inverse().md)
- [byIntersection(with:)](uikit/uiregion/byintersection(with:).md)
- [byUnion(with:)](uikit/uiregion/byunion(with:).md)
