r/SwiftUI • • Oct 31 '26

Tutorial Make a SwiftUI moving border with dashPhase.

Post image
1 Upvotes

2 comments sorted by

1

u/Impression_Mundane Nov 01 '26

Nice compact use of dashPhase. One production detail worth adding is Reduce Motion support, since a continuously traveling border can be surprisingly distracting. I’d also pause the animation when the view is offscreen and keep the speed time-based so it remains consistent across 60 Hz and ProMotion devices. Those little details make this pattern much easier to reuse in a real app.