<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/adding-a-stretchable-header-to-a-swiftui-scrollview-isiruqrrl" -->

---
title: Adding a stretchable header to a SwiftUI ScrollView
description: A step-by-step guide to implementing a stretchable scroll view header in SwiftUI, similar to the Spotify album screen effect. The technique uses GeometryReader...
canonical: https://daily.dev/posts/adding-a-stretchable-header-to-a-swiftui-scrollview-isiruqrrl
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Adding a stretchable header to a SwiftUI ScrollView | daily.dev
og:description: A step-by-step guide to implementing a stretchable scroll view header in SwiftUI, similar to the Spotify album screen effect. The technique uses GeometryReader...
og:url: https://daily.dev/posts/adding-a-stretchable-header-to-a-swiftui-scrollview-isiruqrrl
og:image: https://api.daily.dev/og/posts/ISirUqRRL.png
og:image:alt: Adding a stretchable header to a SwiftUI ScrollView
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Adding a stretchable header to a SwiftUI ScrollView

**[Daniel Saidi](https://daily.dev/sources/danielsaidi)** · 7 min read · 0 upvotes · 0 comments

## Summary

A step-by-step guide to implementing a stretchable scroll view header in SwiftUI, similar to the Spotify album screen effect. The technique uses GeometryReader and a custom view modifier that adjusts the header's frame and offset based on the scroll position. The post also introduces a reusable ScrollViewHeader component that encapsulates the GeometryReader and modifier, demonstrates a full Spotify-like album screen implementation, and notes caveats around NavigationView compatibility, toolbar transparency, and status bar styling.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://danielsaidi.com/blog/2023/02/05/adding-a-stretchable-header-to-a-swiftui-scroll-view>

---

Tags: [#ios](https://daily.dev/tags/ios), [#swift](https://daily.dev/tags/swift), [#swiftui](https://daily.dev/tags/swiftui)

[View this post on daily.dev](https://daily.dev/posts/adding-a-stretchable-header-to-a-swiftui-scrollview-isiruqrrl)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Adding a stretchable header to a SwiftUI ScrollView","url":"https://daily.dev/posts/adding-a-stretchable-header-to-a-swiftui-scrollview-isiruqrrl","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/adding-a-stretchable-header-to-a-swiftui-scrollview-isiruqrrl"},"datePublished":"2026-07-05T07:13:54.833Z","dateModified":"2026-07-05T07:17:39.840Z","description":"A step-by-step guide to implementing a stretchable scroll view header in SwiftUI, similar to the Spotify album screen effect. The technique uses GeometryReader...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/b45388814cd47efcbe4b6674dbd3847d?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/b45388814cd47efcbe4b6674dbd3847d?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"Daniel Saidi","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Daniel Saidi","logo":"https://media.daily.dev/image/upload/s--RRuTMOCm--/f_auto,q_auto/v1783235599/logos/danielsaidi?_a=BAMAMicg0","url":"https://daily.dev/sources/danielsaidi"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/adding-a-stretchable-header-to-a-swiftui-scrollview-isiruqrrl","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"ios,swift,swiftui","timeRequired":"PT7M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Daniel Saidi","item":"https://daily.dev/sources/danielsaidi"},{"@type":"ListItem","position":3,"name":"Adding a stretchable header to a SwiftUI ScrollView"}]}
```

