Advent · Day 9
This one opens on December 9.
Every door opens at midnight Pacific.
See the calendarScreen · Media
Video Editor SwiftUI Screen
Video Editor SwiftUI Screen is a paid SwiftUI screen in SwiftPieces Pro. A timeline video editor: trim, split, speed and titles over clips, undo and redo, and MP4 export through AVFoundation. iOS 17.0 and later. SwiftPieces Pro is $199 once.
A timeline video editor: trim, split, speed and titles over clips, undo and redo, and MP4 export through AVFoundation.
Buyers also search for this as a iOS screen.
| Price | $199 once |
|---|---|
| iOS | iOS 17.0 and later |
| License | A per-developer commercial license for unlimited personal and commercial apps, including client work. Do not resell or redistribute the source as a template or UI kit. |
| Dependencies | No third-party packages. Apple frameworks only. |
| Files | 1 Swift file in the install. |
A full-screen editor for short videos made of clips. The video plays on a stage over a scrolling timeline of titles, frames and a waveform under a fixed playhead; drag to scrub and pinch to zoom. Trim a clip by its handles, split it at the playhead, set its speed and add titles that are burned into the export. The edit is a Codable project you can store and reopen, and Done exports an MP4 off the main actor.
- SwiftUI
- iOS 17.0+
- video-editor
$199 once, every piece included. See how installing works · Sign in
Proof
This targets iOS 17.0 and later. On iOS 26 it uses Liquid Glass. On iOS 17 through iOS 18 it uses a material fallback, including when Reduce Transparency is on.
No simulator still is published for this page yet.
01
What's included
SwiftUI source you own, built on Apple frameworks only.
- A timeline of titles, clip frames and a waveform under a fixed playhead
- Trim handles, Split at Playhead and per-clip speed from 0.5× to 4×
- Titles shown over the video and burned into the export
- Undo and redo across every change, one step per gesture
- A Codable project you store and reopen; sources are never changed
02
Implementation notes
How it behaves, what it handles, and the decisions behind it.
A full-screen editor for a short video made of one or more clips. It shares Photo Editor's layout. The top bar has Cancel, undo and redo in the middle, and Done in the accent. Under it the video plays on a stage with the time in its corner. A label row names the selected clip, its speed and its length, with play and sound buttons at its ends. Below that is the timeline: a text track, the clips as rows of frames, and the sound as a waveform, all scrolling under a fixed playhead. Drag the timeline to scrub, and pinch it to zoom. Four tabs along the bottom choose the tool. Trim puts handles on the selected clip's ends. Split cuts it at the playhead. Speed sets it to 0.5×, 1×, 2× or 4×. Text adds a title at the playhead and edits it in place. A title shows over the video for its stretch of the timeline and is burned into the export. Undo and redo cover every change, one step per gesture. Done exports an MP4, showing a spinner in place of its label, then hands back the file and the project. If that fails, an error line appears under the bar. Cancel asks before discarding changes.
Notes
VideoEditor(clips:project:onDone:onCancel:). Present it full screen. Pass the videos as file URLs, in order.onDoneis@MainActor async throwsand receives aVideoEditor.Resultwith the exported movie'surland theproject. A thrown error shows under the bar, andCancellationErrorreturns quietly. The movie is written to the temporary directory, so move it where you keep it.VideoEditor.Projectholds the clips (source URL, trim and speed), the titles and the sound setting. It isCodable, so store it and pass it back asprojectto pick up where you left off. The source files are never changed.- Playback and export use the same
AVMutableComposition. Each clip's trimmed range is inserted and scaled to its speed, and titles are drawn by a Core Image video composition. Turning the sound off mutes playback and exports silent audio. - Frames and waveforms are read off the main actor once per source when the editor opens, so the timeline fills in as they arrive.
- A clip can't be trimmed shorter than half a second, and Split is off within 0.3 seconds of a clip's ends. The last clip can't be deleted.
- History keeps up to 60 steps. A change is recorded once the timeline has been still for a moment.
- Haptics play for each tab change, for each split or delete, and on failure.
- VoiceOver reads the timeline as an adjustable element (swipe up or down to move a second) and each clip by its number and length.
VideoEditorExampleis the preview: the editor on three short painted sample clips, written on the fly withAVAssetWriter, in Studio.
Theming
The editor reads these tokens:
bgfor the screen,surfacebehind the video, andfillfor the tracks, buttons and the title field.textPrimaryfor Cancel, the controls, the selected clip's outline and handles, and the chosen tab.textSecondaryfor the other tabs, hints and the waveform,textTertiaryfor disabled undo and redo, andseparatorfor the speed chips.accentfor Done and the playhead,dangerfor Delete and the error line.- The type roles
body,subhead,footnoteandcaption, the radiism,mdandlg, andmotion.snappy.
03
Keep building
Pieces that work well next to this one.