SwiftUI 5: What’s New In ScrollView

  Рет қаралды 8,255

Mike Mikina

Mike Mikina

Күн бұрын

Apple has just released a significant update to the SwiftUI’s ScrollView.
In this video, I'm talking about new changes and I built a custom gallery carousel/slider.
You will learn how to use the new SwiftUI ScrollView API: safeAreaPadding, scrollClipDisabled, scrollTargetBehavior, containerRelativeFrame, scrollTargetLayout, scrollTransition and scrollPosition.
Link to the repository: github.com/mikina/WhatsNewInS...
00:00 Intro
01:22 safeAreaPadding
01:56 scrollClipDisabled
02:30 scrollTargetBehavior
03:09 containerRelativeFrame
03:47 scrollTargetLayout
04:12 scrollTransition
07:58 scrollPosition
12:45 Outro
#iOS #SwiftUI #Swift
Music: Streambeats

Пікірлер: 17
@FloWritesCode
@FloWritesCode Жыл бұрын
I planned to make a video like this as well, but yours is so good that I won't do one for now. Great work, Mike. Really nice overview of everything that changed!
@mikemikina
@mikemikina Жыл бұрын
Thanks Flo!
@DVMagicStudios
@DVMagicStudios Ай бұрын
Excellent thorough explanation, pace and visuals.
@user-wt3lh3rc8g
@user-wt3lh3rc8g 6 ай бұрын
awesome explain, thanks
@marvinmeinhard4711
@marvinmeinhard4711 9 ай бұрын
This is perfectly explained and deserves much more views. Thank You!
@mikemikina
@mikemikina 9 ай бұрын
Thanks Marvin! 🙌
@rongqingsun1927
@rongqingsun1927 8 ай бұрын
Very nice video, thank you!!
@mikemikina
@mikemikina 8 ай бұрын
Glad you liked it!
@satoriappdev
@satoriappdev 7 ай бұрын
Very well done
@mikemikina
@mikemikina 7 ай бұрын
Thanks!
@tbarcello
@tbarcello 4 ай бұрын
How about keeping the selected photo always horizontally centered? Possible?
@mikemikina
@mikemikina 4 ай бұрын
Yes, it is. I actually started with this. It looked like an old iPod animation 😄 But it had a problem with the last photo. That's why I decided to switch to a simpler version.
@FriedItalian
@FriedItalian 9 ай бұрын
scrollPosition(initialAnchor) is not showing up in my xcode and I cannot find documentation for it. Any help?
@mikemikina
@mikemikina 9 ай бұрын
The scrollPosition(initialAnchor:) has been replaced by the defaultScrollAnchor(_:). You can find it here: developer.apple.com/documentation/swiftui/view/defaultscrollanchor(_:)
@Kamboire
@Kamboire 4 күн бұрын
My photo text don't appear even with your binding method any help ?
@mikemikina
@mikemikina Күн бұрын
Can you share your code?
@Kamboire
@Kamboire 8 сағат бұрын
@@mikemikina GeometryReader(content: { geometry in let size = geometry.size ScrollView(.horizontal){ HStack(spacing : 5){ ForEach(RowCards){ card in GeometryReader(content: { proxy in let cardsize = proxy.size let minX = proxy.frame(in: .scrollView).minX - 30.0 let minX2 = min((proxy.frame(in: .scrollView).minX*1.4),size.width*1.4) Image(card.image) .resizable() .aspectRatio(contentMode: .fill) .offset(x: -minX) .frame(width: cardsize.width, height: cardsize.height) .clipShape(.rect(cornerRadius: 10) ) .shadow(color: /*@START_MENU_TOKEN@*/.black/*@END_MENU_TOKEN@*/.opacity(0.25), radius: 8, x : 5 ,y : 10) }) .frame(width: size.width - 60) .scrollTransition(.interactive,axis: .horizontal) { view, phase in view .scaleEffect(phase.isIdentity ? 1 : 0.93) } } } .padding(.horizontal,15) .scrollTargetLayout() .frame(height: size.height,alignment: .top) } .scrollTargetBehavior(.viewAligned) .scrollIndicators(.hidden) }) .frame(height: 400) .padding(.horizontal,-15) .padding(.top,10) } } .padding(15) } .scrollIndicators(.hidden) }
SwiftUI: New Observation Framework
8:25
Mike Mikina
Рет қаралды 1,8 М.
Super Power Scroll Views - SwiftUI - iOS 17
9:14
Sean Allen
Рет қаралды 24 М.
НРАВИТСЯ ЭТОТ ФОРМАТ??
00:37
МЯТНАЯ ФАНТА
Рет қаралды 7 МЛН
Эффект Карбонаро и нестандартная коробка
01:00
История одного вокалиста
Рет қаралды 9 МЛН
Clowns abuse children#Short #Officer Rabbit #angel
00:51
兔子警官
Рет қаралды 78 МЛН
Я обещал подарить ему самокат!
01:00
Vlad Samokatchik
Рет қаралды 3,3 МЛН
GeometryReader in SwiftUI: An Annoying Nightmare
24:00
Rebeloper - Rebel Developer
Рет қаралды 805
Stop using GeometryReader in SwiftUI
4:27
Flo writes Code
Рет қаралды 4,2 М.
WWDC24: What’s new in SwiftUI | Apple
23:13
Apple Developer
Рет қаралды 63 М.
Create a Custom Dialog in SwiftUI
16:52
Mike Mikina
Рет қаралды 7 М.
Learn when SwiftUI re-renders views
5:23
Mike Mikina
Рет қаралды 1 М.
Крутая карусель через UICollectionView
26:20
WWDC23: Explore SwiftUI animation | Apple
30:02
Apple Developer
Рет қаралды 2,3 М.
What's New in SwiftUI State Management
29:48
azamsharp
Рет қаралды 6 М.
8 Товаров с Алиэкспресс, о которых ты мог и не знать!
49:47
РасПаковка ДваПаковка
Рет қаралды 146 М.
НОВЫЕ ФЕЙК iPHONE 🤯 #iphone
0:37
ALSER kz
Рет қаралды 270 М.
ОБСЛУЖИЛИ САМЫЙ ГРЯЗНЫЙ ПК
1:00
VA-PC
Рет қаралды 2,4 МЛН
НЕ БЕРУ APPLE VISION PRO!
0:37
ТЕСЛЕР
Рет қаралды 355 М.