One Logo Pool Ball
SwiftUICore · IOS API REFERENCE

RectangleCornerRadii

struct · iOS 16.0+ · SDK 27.1

@frozen struct RectangleCornerRadii

Describes the corner radius values of a rounded rectangle with uneven corners.

Members (12)

init · iOS 16.0+

init

TypeScript
static init(topLeading?: number, bottomLeading?: number, bottomTrailing?: number, topTrailing?: number): RectangleCornerRadii
Swift declaration
@export(implementation) init(topLeading: CGFloat = 0, bottomLeading: CGFloat = 0, bottomTrailing: CGFloat = 0, topTrailing: CGFloat = 0)

Creates a new set of corner radii for a rounded rectangle with uneven corners. - Parameters: - topLeading: the radius of the top-leading corner. - bottomLeading: the radius of the bottom-leading corner. - bottomTrailing: the radius of the bottom-trailing corner. - topTrailing: the radius of the top-trailing corner.

get · iOS 16.0+

topLeading

TypeScript
get topLeading(): number
Swift declaration
@export(implementation) var topLeading: CGFloat { get set }

The radius of the top-leading corner.

set · iOS 16.0+

topLeading

TypeScript
set topLeading(value: number)
Swift declaration
@export(implementation) var topLeading: CGFloat { get set }

The radius of the top-leading corner.

get · iOS 16.0+

topTrailing

TypeScript
get topTrailing(): number
Swift declaration
@export(implementation) var topTrailing: CGFloat { get set }

The radius of the top-trailing corner.

set · iOS 16.0+

topTrailing

TypeScript
set topTrailing(value: number)
Swift declaration
@export(implementation) var topTrailing: CGFloat { get set }

The radius of the top-trailing corner.

get · iOS 16.0+

bottomLeading

TypeScript
get bottomLeading(): number
Swift declaration
@export(implementation) var bottomLeading: CGFloat { get set }

The radius of the bottom-leading corner.

set · iOS 16.0+

bottomLeading

TypeScript
set bottomLeading(value: number)
Swift declaration
@export(implementation) var bottomLeading: CGFloat { get set }

The radius of the bottom-leading corner.

get · iOS 16.0+

animatableData

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

The data to animate. SwiftUI reads this property to capture the current vector representation of the animatable state, and writes it back on each animation frame with an interpolated value. The default implementation returns ``EmptyAnimatableData``, meaning nothing is animated. Use the ``Animatable()`` macro to synthesize this property automatically. Implement it by hand only when you need custom interpolation logic such as clamping, normalization, or mapping to a derived value.

set · iOS 16.0+

animatableData

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

The data to animate. SwiftUI reads this property to capture the current vector representation of the animatable state, and writes it back on each animation frame with an interpolated value. The default implementation returns ``EmptyAnimatableData``, meaning nothing is animated. Use the ``Animatable()`` macro to synthesize this property automatically. Implement it by hand only when you need custom interpolation logic such as clamping, normalization, or mapping to a derived value.

get · iOS 16.0+

bottomTrailing

TypeScript
get bottomTrailing(): number
Swift declaration
@export(implementation) var bottomTrailing: CGFloat { get set }

The radius of the bottom-trailing corner.

set · iOS 16.0+

bottomTrailing

TypeScript
set bottomTrailing(value: number)
Swift declaration
@export(implementation) var bottomTrailing: CGFloat { get set }

The radius of the bottom-trailing corner.

subscript · iOS 26.0+

subscript

TypeScript
subscript(corner: Edge_Corner): number
Swift declaration
subscript(corner: Edge.Corner) -> CGFloat { get }

Returns the corner radius for a certain corner.

Skipped declarations

No declarations were skipped in this snapshot.

All SwiftUICore types →