Contents

UIShape

An abstract representation of a shape.

Declaration

struct UIShape

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

Creating a hover shape from a custom path

Creating a dynamic hover shape

Creating a shape by applying insets

See Also

Specifying a hover shape