A shape for use in UIKit Dynamics.


@interface UIRegion : NSObject


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.


Creating and Initializing Regions


Returns the region that encloses all points.

- initWithSize:

Initializes and returns a rectangular region of the specified size.

- initWithRadius:

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

Creating Complex Regions

- inverseRegion

Returns a new region that is the mathematical inverse of the current region.

- regionByDifferenceFromRegion:

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

- regionByIntersectionWithRegion:

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

- regionByUnionWithRegion:

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

Interacting with a Region

- containsPoint:

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


Inherits From

Conforms To