Album Artwork Scroll Morph

Album Artwork Scroll Morph

An album screen whose large centered artwork shrinks and drifts up in exact proportion to the scroll until it docks as a thumbnail next to the title in a custom top bar. Scrolling back reverses it, and pulling past the top stretches the artwork.

Luiz Mello
  • header
  • audio
  • animation

snippet.swift453 lines

11 files • Scroll to see all →
public struct AlbumArtworkScrollMorphTrack: Identifiable, Hashable {    public let id: String    public let title: String    public let duration: TimeInterval    public let isExplicit: Bool​    public init(title: String, duration: TimeInterval, isExplicit: Bool = false) {        self.id = title        self.title = title        self.duration = duration        self.isExplicit = isExplicit    }}​/// An album or playlist. Artwork is a mesh gradient plus an SF Symbol, so the/// snippet needs no image assets: swap `AlbumArtworkScrollMorphArtwork` for your image view.public struct AlbumArtworkScrollMorphAlbum: Identifiable, Hashable {    public let id: String    public let title: String    public let artist: String​// ... (click "Show full code" to see more)
Viewing: Model.swift•1 of 11