---
title: UIShape
framework: uikit
role: symbol
role_heading: Structure
path: uikit/uishape-swift.struct
---

# UIShape

An abstract representation of a shape.

## Declaration

```swift
struct UIShape
```

## Overview

Overview A UIShape can represent different types of shapes, including: A simple shape like a rectangle or circle that resolves into a concrete shape according to context (like size and position) A Bézier path A dynamic shape that resolves using a custom closure You typically use a UIShape with APIs like UIHoverStyle to represent the shape of an effect.

## Topics

### Creating a hover shape

- [rect](uikit/uishape-swift.struct/rect.md)
- [capsule](uikit/uishape-swift.struct/capsule.md)
- [circle](uikit/uishape-swift.struct/circle.md)
- [rect(cornerRadius:cornerCurve:maskedCorners:)](uikit/uishape-swift.struct/rect(cornerradius:cornercurve:maskedcorners:).md)
- [fixedRect(_:cornerRadius:cornerCurve:maskedCorners:)](uikit/uishape-swift.struct/fixedrect(_:cornerradius:cornercurve:maskedcorners:).md)
- [UICornerCurve](uikit/uicornercurve.md)

### Creating a hover shape from a custom path

- [path(_:)](uikit/uishape-swift.struct/path(_:).md)

### Creating a dynamic hover shape

- [init(_:)](uikit/uishape-swift.struct/init(_:).md)
- [UIShapeProvider](uikit/uishapeprovider-60loj.md)
- [UIShape.ResolutionContext](uikit/uishape-swift.struct/resolutioncontext.md)
- [UIShape.Resolved](uikit/uishape-swift.struct/resolved.md)

### Creating a shape by applying insets

- [inset(by:)](uikit/uishape-swift.struct/inset(by:)-5jxgl.md)
- [inset(by:)](uikit/uishape-swift.struct/inset(by:)-7v5nk.md)

## Relationships

### Conforms To

- [Copyable](swift/copyable.md)
- [CustomDebugStringConvertible](swift/customdebugstringconvertible.md)
- [CustomStringConvertible](swift/customstringconvertible.md)
- [Equatable](swift/equatable.md)
- [Escapable](swift/escapable.md)
- [UIShapeProvider](uikit/uishapeprovider-60loj.md)

## See Also

### Specifying a hover shape

- [shape](uikit/uihoverstyle/shape-21npk.md)
