Free on iPhone · iOS 17 and later
Write SwiftUI.Run it live.Copy it out.
A canvas for one component. Type it on your iPhone, or ask your AI, watch it run on the device, and copy source that compiles in Xcode.
- TimelineView
- PhaseAnimator
- DragGesture
- symbolEffect
- withAnimation
- GeometryReader
- sensoryFeedback
- MagnifyGesture
- Path
- transition
- @State
- sin · cos · .pi
- 01It runs.Springs, timelines and trig are computed on the phone. Nothing is a canned preview.
- 02It pastes.What you copy is what you typed. No package. Nothing to import beyond SwiftUI.
- 03It refuses.If it can’t play something the way Xcode would, it stops and names the line.
Press play.
Recorded in the app, not mocked. The ball is the component, running on the phone.
What plays
One component, postcard size. Not a screen, and not an app.
import SwiftUI struct TwinOrbitLoader: View { var size: Double = 54 var period: Double = 0.85 var colorA: Color = .mint var colorB: Color = .cyan var body: some View { TimelineView(.animation) { context in let t = context.date.timeIntervalSinceReferenceDate let a = t * .pi * 2 / period ZStack { ball(angle: a, color: colorA) ball(angle: a + .pi, color: colorB) } } .frame(width: size, height: size) } func ball(angle: Double, color: Color) -> some View { let depth = sin(angle) Circle() .fill(color.gradient) .frame(width: size * 0.36, height: size * 0.36) .scaleEffect(0.78 + 0.22 * ((depth + 1) / 2)) .offset(x: cos(angle) * size * 0.28, y: sin(angle) * size * 0.1) .zIndex(depth) } }
That file plays on the phone as written, and pastes into Xcode unchanged.
- Views
Text,Image,Button,Toggle,Slider,TextField,ProgressView, stacks,ForEach,TimelineView,PhaseAnimator,GeometryReader,Path,Shape, gradients, and the basic shapes.- Motion and input
animation,transition,onAppear,onTapGesture,DragGesture,MagnifyGesture,symbolEffect,sensoryFeedback.- Swift
@State,let,var, helpers,if/else, loops, ranges, andsin,cos,sqrt,min,max,.pi.- Not here
- No
ScrollView,List,NavigationStack,TabView, sheets, ormatchedGeometryEffect. Swoop is one component, not a screen.
Read a file
One component each. The source on the page is the source that plays, and it pastes into Xcode unchanged.
- 01SwiftUI animationHow a component keeps time on the phone.
- 02SwiftUI code previewThe stage runs the file. It does not mime it.
- 03Learn SwiftUIOne view at a time. Not a course.
- 04Loading animationTwo dots on a timeline.
- 05Rotation animationAn angle, every frame.
- 06withAnimationChange state, and the view eases.
- 07onAppearMove once, when the view shows up.
- 08Offset animationPlace a shape without a stack doing it.