SwiftUI Ellipse
Published Dec 12, 2022
Contribute to Docs
The Ellipse is one of SwiftUI pre-built shapes like rectangles and circles.
Syntax
var body: some View {
Ellipse()
Modifiers here
}
Example
The following example makes a blue Ellipse with a dimension of 150 points wide by 50 points high:
var body: some View {Ellipse().fill(.blue).frame(width: 150, height: 50)}
This will display the following:

Contribute to Docs
- Learn more about how to get involved.
- Edit this page on GitHub to fix an error or make an improvement.
- Submit feedback to let us know how we can improve Docs.
Learn SwiftUI on Codecademy
- Learn how to build iOS applications with Swift and SwiftUI and publish them to Apples' App Store.
- Includes 7 Courses
- With Certificate
- Beginner Friendly.13 hours