Swift PiecesPro
  • Library
    Screens48Finished, designed screens for real apps.Templates10Complete apps built from the screens.Build Kit24Styles, briefs and recipes for your coding agentEverything58The whole library, with search
  • Docs
  • Pro

Library

  • Screens48
  • Templates10
  • Build Kit24
  • Everything58
  • Docs
  • Pro
  • Account
Get Swift Pieces ProFree library ↗
Swift PiecesPro

Production-ready SwiftUI screens and app templates for iOS. The pieces to build the whole app.

Library

  • Screens
  • Templates
  • Build Kit
  • Everything

Product

  • Pro
  • Your account
  • Sign in

Resources

  • Docs
  • CLI
  • MCP and agents
  • Free library

Social

  • X / Twitter
  • GitHub

SWIFTPIECES PRO

© 2026 Swift Pieces. One payment, lifetime access, per-developer commercial license.

Curated withby Saivion

LibraryScreensPodcast Player

Screen · Media

Podcast Player

An episode player built on a waveform you scrub, with chapters, speed and sleep.

An episode player on a Canvas-drawn waveform with bucketed samples, a tinted played portion, lifting bars and a floating readout under the finger, haptic ticks, velocity fling and a live mode.

SwiftUIiOS 17.0+waveform-scrubber

Get Swift Pieces Pro

$199 once, every piece included. See how installing works · Sign in

01

What's included

SwiftUI source you own, built on Apple frameworks only.

  • A Canvas-drawn waveform with a tinted played portion
  • Bars lift under the finger with a floating readout
  • Haptic ticks, velocity fling and a live recording mode
  • The episode screen from the preview: chapters, skip, speed and sleep

02

Implementation notes

How it behaves, what it handles, and the decisions behind it.

Samples are bucketed to the number of bars that fit the width and drawn in one Canvas, so a 10,000-sample track costs the same as a 60-bar one. The played portion is tinted. Drag to seek: the bars around the finger lift toward it, a time readout floats above the finger, and a selection tick fires every tickEvery bars. Release with velocity and the position flings on with exponential deceleration before onSeek fires. Live mode shows the newest samples entering from the right, for recording surfaces.

Notes

  • Bucketing takes the peak of each bucket, so quiet passages stay quiet and transients stay visible. It reruns only when the width or the sample count changes.
  • The lift is a Gaussian around the finger (about 28pt wide) applied to bar height and unplayed opacity; Reduce Motion draws bars flat and skips the fling.
  • The fling is a short Task loop that writes progress each frame and stops at either end; a new touch cancels it.
  • Live mode disables the gesture, treats every bar as played and right-aligns the waveform until it fills the width.
  • VoiceOver: an adjustable element reporting elapsed of total, stepping 5 seconds.
  • WaveformScrubberExample at the end of WaveformScrubber.swift is the screen shown in the preview; copy it as a starting point.

03

Keep building

Pieces that work well next to this one.

Screen · Media

Now Playing

A music library with a floating player that grows into a full now-playing screen.

Screen · AI

Voice Mode

A voice conversation screen around a Metal glass orb with a Siri-style wave, locked to thinking.

Screen · Media

Gallery

A trip album that pages with depth, captions on color blocks, and a pinch to peek at the centred photo.