0Pricing
SwiftUI Academy · Lesson

Stroke, Fill & overlay

Outline and fill shapes for badges and cards.

Fill vs Stroke

A shape can be painted inside with fill or outlined with stroke. Together they let you build badges and cards.

Filling a Shape

Use fill to paint the whole inside of a shape with a color or gradient. It is the most common way to color a shape. 🎨

Circle()
    .fill(.blue)

All lessons in this course

  1. The Color Type & Asset Colors
  2. Linear, Radial & Angular Gradients
  3. Built-in Shapes
  4. Stroke, Fill & overlay
← Back to SwiftUI Academy