One Logo Pool Ball
SwiftUICore · IOS API REFERENCE

UnevenRoundedRectangle

struct · iOS 16.0+ · SDK 27.1

@frozen struct UnevenRoundedRectangle

A rectangular shape with rounded corners with different values, aligned inside the frame of the view containing it.

Members (10)

init · iOS 16.0+

init

TypeScript
static initCornerRadiiStyle(cornerRadii: RectangleCornerRadii, style?: RoundedCornerStyle): UnevenRoundedRectangle
Swift declaration
init(cornerRadii: RectangleCornerRadii, style: RoundedCornerStyle = .continuous)

Creates a new rounded rectangle shape with uneven corners. - Parameters: - cornerRadii: the radii of each corner. - style: the style of corners drawn by the shape.

get · iOS 16.0+

cornerRadii

TypeScript
get cornerRadii(): RectangleCornerRadii
Swift declaration
var cornerRadii: RectangleCornerRadii

The radii of each corner of the rounded rectangle.

set · iOS 16.0+

cornerRadii

TypeScript
set cornerRadii(value: RectangleCornerRadii)
Swift declaration
var cornerRadii: RectangleCornerRadii

The radii of each corner of the rounded rectangle.

get · iOS 16.0+

animatableData

TypeScript
get animatableData(): AnimatablePair<AnimatablePair<number, number>, AnimatablePair<number, number>>
Swift declaration
nonisolated var animatableData: RectangleCornerRadii.AnimatableData { get set }

The data to animate.

set · iOS 16.0+

animatableData

TypeScript
set animatableData(value: AnimatablePair<AnimatablePair<number, number>, AnimatablePair<number, number>>)
Swift declaration
nonisolated var animatableData: RectangleCornerRadii.AnimatableData { get set }

The data to animate.

init · iOS 16.0+

init

TypeScript
static initTopLeadingRadiusBottomLeadingRadiusBottomTrailingRadiusTopTrailingRadiusStyle(topLeadingRadius?: number, bottomLeadingRadius?: number, bottomTrailingRadius?: number, topTrailingRadius?: number, style?: RoundedCornerStyle): UnevenRoundedRectangle
Swift declaration
@export(implementation) init(topLeadingRadius: CGFloat = 0, bottomLeadingRadius: CGFloat = 0, bottomTrailingRadius: CGFloat = 0, topTrailingRadius: CGFloat = 0, style: RoundedCornerStyle = .continuous)

Creates a new rounded rectangle shape with uneven corners.

method · iOS 16.0+

path

TypeScript
path(rect: { x: number; y: number; width: number; height: number }): Path
Swift declaration
nonisolated func path(in rect: CGRect) -> Path

Describes this shape as a path within a rectangular frame of reference. - Parameter rect: The frame of reference for describing this shape. - Returns: A path that describes this shape.

get · iOS 16.0+

style

TypeScript
get style(): RoundedCornerStyle
Swift declaration
var style: RoundedCornerStyle

The style of corners drawn by the rounded rectangle.

set · iOS 16.0+

style

TypeScript
set style(value: RoundedCornerStyle)
Swift declaration
var style: RoundedCornerStyle

The style of corners drawn by the rounded rectangle.

method · iOS 26.0+

corners

TypeScript
corners(size?: ({ width: number; height: number }) | null): (RoundedRectangularShapeCorners) | null
Swift declaration
func corners(in size: CGSize?) -> UnevenRoundedRectangle.Corners?

Resolved corners given a size. If the corner style of a shape is size-dependent, read the provided size and return values accordingly. This function could be called with a nil size when the size hasn't been determined. In that case, return the best approximated value. For example, for a capsule shape, its corner radius is determined by the size. If size is not available, return `.fixed(.infinity)` to indicate that the corner should be as round as it could be.

Skipped declarations

1 declarations were excluded from these bindings. Each reason comes from the generator or the iOS SDK compiler.

UnevenRoundedRectangle.inset(by:)

This protocol needs associated types that cannot yet cross the bridge.

All SwiftUICore types →