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

# UIRegion

A shape for use in UIKit Dynamics.

```
@MainActor class UIRegion
```

## Overview

When creating animations, you use regions to define the effective area of a field behavior such as a magnetic or gravitational force. Most regions are rectangular or elliptical in shape, but you can use the methods of this class to create more complex shapes by adding, subtracting, and intersecting other regions.

When creating a new region, you specify only the size of the corresponding rectangle or circle. The origin of a newly created region is at the center of the specified area, and any mathematical manipulations you make to the region occur relative to that origin point.

## Topics

### Creating and initializing regions

[`infiniteRegion`](/documentation/UIKit/UIRegion/infinite)

Returns the region that encloses all points.

[`-  initWithSize:`](/documentation/UIKit/UIRegion/init(size:))

Initializes and returns a rectangular region of the specified size.

[`-  initWithRadius:`](/documentation/UIKit/UIRegion/init(radius:))

Initializes and returns a region with a circular shape of the specified radius.

### Creating complex regions

[`-  inverseRegion`](/documentation/UIKit/UIRegion/inverse())

Returns a new region that’s the mathematical inverse of the current region.

[`-  regionByDifferenceFromRegion:`](/documentation/UIKit/UIRegion/byDifference(from:))

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

[`-  regionByIntersectionWithRegion:`](/documentation/UIKit/UIRegion/byIntersection(with:))

Returns a new region containing only the area occupied by both the specified region and current region.

[`-  regionByUnionWithRegion:`](/documentation/UIKit/UIRegion/byUnion(with:))

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

### Interacting with a region

[`-  containsPoint:`](/documentation/UIKit/UIRegion/contains(_:))

Returns a Boolean indicating whether the specified point is inside of the current region.

## Relationships

### Conforms To

[`NSObjectProtocol`](/documentation/ObjectiveC/NSObjectProtocol)

[`Hashable`](/documentation/Swift/Hashable)

[`NSCopying`](/documentation/Foundation/NSCopying)

[`CustomStringConvertible`](/documentation/Swift/CustomStringConvertible)

[`Equatable`](/documentation/Swift/Equatable)

[`CustomDebugStringConvertible`](/documentation/Swift/CustomDebugStringConvertible)

[`NSCoding`](/documentation/Foundation/NSCoding)

[`Sendable`](/documentation/Swift/Sendable)

[`CVarArg`](/documentation/Swift/CVarArg)

### Inherits From

[`NSObject-swift.class`](/documentation/ObjectiveC/NSObject-swift.class)

---

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)