---
title: "byUnion(with:)"
framework: uikit
role: symbol
role_heading: Instance Method
path: "uikit/uiregion/byunion(with:)"
---

# byUnion(with:)

Returns a new region containing the combined areas of the specified region and the current region.

## Declaration

```swift
func byUnion(with region: UIRegion) -> Self
```

## Parameters

- `region`: The region to be combined with the current region.

## Return Value

Return Value A new region that contains the points from both the current region and the shape specified by the region parameter.

## Discussion

Discussion Combining any region with the infinite region returns the infinite region.

## See Also

### Creating complex regions

- [inverse()](uikit/uiregion/inverse().md)
- [byDifference(from:)](uikit/uiregion/bydifference(from:).md)
- [byIntersection(with:)](uikit/uiregion/byintersection(with:).md)
