Write SwiftUI. Press play.
On your phone.
A canvas for postcard-sized components. Type one, watch it run for real, and copy source that compiles in Xcode.
iPhone · iOS 17 and later · free.
Everything here is running. None of it is a screenshot.
The loop
Type it, run it, take it with you.
Your source drives the stage. What you copy is what you typed.
import SwiftUI
struct RingSpinner: View {
@State private var turning = false
var body: some View {
Circle()
.trim(from: 0, to: 0.72)
.stroke(.orange, lineWidth: 5)
.frame(width: 46, height: 46)
.rotationEffect(.degrees(turning ? 360 : 0))
.animation(.linear(duration: 1).repeatForever(autoreverses: false),
value: turning)
.onAppear { turning = true }
}
}It runs, it doesn’t mime
Springs, TimelineView and trigonometry are computed on the
device, at the frame rate you feel.
Copy compiles
Plain SwiftUI. No package to install, nothing to import beyond
SwiftUI.
Fails closed, with a line number
If Swoop can’t play something exactly the way Xcode would, it refuses and points at the line rather than guessing.
Writing
Animation, worked through.
Every example is a complete file, and every one of them runs on the page you’re reading.
SwiftUI animation examples
Eight components, complete source for each, all running as you read.
2026-09-08SwiftUI loading animation
Four spinners, complete files, no package to install.
2026-09-08withAnimation, and the modifier that replaced it
Two ways to animate the same change, and the rule for picking one.
2026-09-08SwiftUI rotation animation
rotationEffect, anchors, and the two mistakes everybody makes once.
2026-09-08The subset
Views
Text, Image,
Button, Toggle, Spacer,
Divider, VStack, HStack,
ZStack, ForEach, TimelineView,
Circle, Capsule, Rectangle,
RoundedRectangle.
Modifiers
frame,
padding, offset, foregroundStyle,
fill, stroke, trim,
background, overlay, opacity,
scaleEffect, rotationEffect, zIndex,
clipShape, shadow, animation,
onAppear.
Swift
@State, let,
var, parameters with defaults, computed some View
properties, helper funcs, if/else,
ranges, arithmetic, and sin, cos,
sqrt, pow, min, max,
.pi.
Deliberately not here
No ScrollView,
List, NavigationStack, GeometryReader
or TextField. Swoop is for one component at postcard size, not
for building screens on a phone.
Shared links