Comments (3)
Hey @gabrielribeiro
Thank you, happy to hear that it helped!
Sure, it should work right away. I basically just replaced the preview header in the SpotifyPreviewScreen
with this:
func scrollViewHeader() -> some View {
TabView {
Color.red
Color.green
Color.blue
}
.tabViewStyle(.page)
}
and the result becomes:
So it seems to work pretty well :) But you need to adjust the docked state so that it's based on the currently active page, otherwise you'll get this when scrolling while the second (green) page is active:
from scrollkit.
Wow that's awesome! Thank you so much for the help!
from scrollkit.
Also, if you don't need the pinned behavior, you can just use the ScrollViewHeader
inside a regular ScrollView
:)
ScrollView {
VStack {
ScrollViewHeader {
TabView {
Color.red
Color.green
Color.blue
}
.tabViewStyle(.page)
}
.frame(height: 250)
LazyVStack {
ForEach(0...100, id: \.self) {
Text("\($0)")
}
}
}
}
The result becomes:
from scrollkit.
Related Issues (12)
- Make it possible to specify a minimum header height HOT 1
- `ScrollViewHeader` behaves strangely with presentationDetents HOT 3
- ScrollViewWithStickyHeader doesn't scroll on iPad HOT 3
- Add support for large title HOT 1
- iOS 17 bug HOT 8
- Losing touch events after a stretch HOT 4
- ScrollViewWithStickyHeader doesn't pass 'showsIndicators' to ScrollViewWithOffsetTracking HOT 1
- How to set initial offset for ScrollViewWithOffsetTracking HOT 3
- Question: how can I use this library to dismiss a few on the pull down? HOT 1
- How to center placeholder with ScrollViewWithStickyHeader HOT 8
- Can i detect when ScrollView has finished scrolling? HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from scrollkit.