Build a stretchy header with SwiftUI on iOS 18

  Рет қаралды 1,217

donny wals

donny wals

26 күн бұрын

Let's take a look at SwiftUI's new onScrollGeometryChange view modifier to create a stretchy header effect with little to no workarounds!

Пікірлер: 9
@tokero5199
@tokero5199 24 күн бұрын
Cool. Now we just have to way a few years to be able to use it because Apple does not want to backport UI like Android has AndroidX....
@xzilja
@xzilja 19 күн бұрын
Hard to tell from the video, but did you by any chance notice a bit "out of sync" in scrolling and transitioning when using this modifier? I just did simple recreation with it and GeometryReader and it seems as if geometry reader is more accurate "reactive". Particularly when scrolling super slow
@DonnyWalsdev
@DonnyWalsdev 19 күн бұрын
I didn't notice any, but I also have to admit I didn't compare and do super slow scrolls so you might be right. Wonder about the overall performance difference though; GeometryReader in general is very slow. It'd be interesting to compare performance on increasingly large and complex views to see if one breaks down where the other doesn't
@w0mblemania
@w0mblemania 24 күн бұрын
Donny, at the beginning of the video, the list of items is overlapping the header in a nasty way. This may be because you have set a fixed height for the rectangle (300 pts). So the image height is being adjusted dynamically, but the rectangle is not. Cheers.
@DonnyWalsdev
@DonnyWalsdev 24 күн бұрын
Do you mean there’s a glitch while I’m messing around with scrolling in the beginning? Not sure why that happened. Changing the rectangles height causes the entire scroll view to glitch unfortunately; otherwise the header image could have been in the scroll view and we wouldn’t have needed the ZStack at all.
@jrgibson
@jrgibson 13 күн бұрын
@@DonnyWalsdev I noticed that glitch happens with my app in 18 too, I raised feedback for it.
How ChatGPT Built My App in Minutes 🤯
8:28
Website Learners
Рет қаралды 2,1 МЛН
Actor Reentrancy in Swift explained
20:18
donny wals
Рет қаралды 1 М.
Vivaan  Tanya once again pranked Papa 🤣😇🤣
00:10
seema lamba
Рет қаралды 30 МЛН
孩子多的烦恼?#火影忍者 #家庭 #佐助
00:31
火影忍者一家
Рет қаралды 42 МЛН
Wait for the last one! 👀
00:28
Josh Horton
Рет қаралды 133 МЛН
Comparing @Observable to ObservableObjects in SwiftUI
12:57
donny wals
Рет қаралды 1,2 М.
Xcode 16 Beta Code Completion: I Let AI Design My App
4:57
Grodes Codes
Рет қаралды 1,4 М.
You might not need useEffect() ...
21:45
Academind
Рет қаралды 152 М.
How to OVER Engineer a Website // What is a Tech Stack?
11:20
Fireship
Рет қаралды 2,3 МЛН
SwiftUI Scrollable Tab Bar - iOS 17
10:49
Kavsoft
Рет қаралды 6 М.
How to store two types in the same variable using a type called Either
2:29
Using Closures as Dependencies
15:18
donny wals
Рет қаралды 1,1 М.
good-natured puppy #viral #trending #dog
0:27
Kẹo cute
Рет қаралды 6 МЛН
P7 Amazing Gadgets, Kitchen Utensils, Home cleaning, Inventions, Ideas part 4
0:10
how to make a dratti dratte making #viral #dratti #dratte
0:15
offical Blacksmith
Рет қаралды 55 МЛН
Let me show you (P8)
0:21
Discovery Boy
Рет қаралды 4,7 МЛН