Building custom transitions using ViewModifier - Animation SwiftUI Tutorial 8/8

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

Paul Hudson

Paul Hudson

8 ай бұрын

Download the completed project here: github.com/twostraws/hackingw...
Other parts in Project 6:
Introduction: www.hackingwithswift.com/book...
1. Creating implicit animations: • Creating implicit anim...
2. Customizing animations in SwiftUI: • Customizing animations...
3. Animating bindings: • Animating bindings - A...
4. Creating explicit animations: • Creating explicit anim...
5. Controlling the animation stack: • Controlling the animat...
6. Animating gestures: • Animating gestures - A...
7. Showing and hiding views with transitions: • Showing and hiding vie...
8. Building custom transitions using ViewModifier: This video
Wrap up and challenges: www.hackingwithswift.com/book...
You can find the full set of videos, along with transcriptions, challenges, tests, and more, in my free 100 Days of SwiftUI course: www.hackingwithswift.com/100/...
Watch the full 100 Days of SwiftUI playlist here: • 100 Days of SwiftUI (i...

Пікірлер: 9
@jeyhey5320
@jeyhey5320 8 ай бұрын
Great video! Reminds me, I need more animations in my apps.
@danstoian7721
@danstoian7721 8 ай бұрын
5:00 I don't quite get it why removing clipped does that. You still have the if that only renders the view under that condition. So why does the red rectangle still show?
@OriginalJetForMe
@OriginalJetForMe 8 ай бұрын
I notice when you toggle back to false, we don’t see it rotate back out. It seems the blue view obscures it, because you can see it when it’s not clipped. What’s going on there?
@trevorclute8231
@trevorclute8231 8 ай бұрын
^^^
@wavemaster111188
@wavemaster111188 8 ай бұрын
You see in the unclipped version that the blue view is on top of the red view. I assume that's because it's already gone for the ZStack. Maybe if you give the red view a higher zindex, it will stay on top and thus showing the disappear animation.
@MorganMath314
@MorganMath314 8 ай бұрын
Shouldn't the red view be removed altogether when isShowingRed is false?
@ddwsc_xv
@ddwsc_xv 7 ай бұрын
I modified it a bit and the result is as you would expect: ZStack { Rectangle() .fill(.blue) .frame(width: 200, height: 200) Rectangle() .fill(.red) .frame(width: 200, height: 200) .rotationEffect(.degrees(isShowingRed ? 0 : -90), anchor: .topLeading) .clipped() } .onTapGesture { withAnimation { isShowingRed.toggle() } }
@ddwsc_xv
@ddwsc_xv 7 ай бұрын
I think it's because our flag isShowingRed is toggled so our red view disappeared (as normal), but we're using animation so it must done animation before go away
Customizing animations in SwiftUI - Animation SwiftUI Tutorial 2/8
8:39
Animating gestures - Animation SwiftUI Tutorial 6/8
10:07
Paul Hudson
Рет қаралды 1 М.
бесит старшая сестра!? #роблокс #анимация #мем
00:58
КРУТОЙ ПАПА на
Рет қаралды 3,1 МЛН
NERF WAR HEAVY: Drone Battle!
00:30
MacDannyGun
Рет қаралды 18 МЛН
Универ. 13 лет спустя - ВСЕ СЕРИИ ПОДРЯД
9:07:11
Комедии 2023
Рет қаралды 6 МЛН
How to create custom ViewModifiers in SwiftUI | Advanced Learning #1
18:59
SwiftUI Profile Animation | Matched Geometry Effect
9:48
Sean Allen
Рет қаралды 16 М.
Metal Renderer in SwiftUI | Xcode 15
20:39
LuTheCoder
Рет қаралды 1,1 М.
SwiftUI Drag and Drop with Transferable Custom Object
26:33
Sean Allen
Рет қаралды 18 М.
SwiftUI Grids - LazyVGrid, LazyHGrid, Static Grid
17:55
Sean Allen
Рет қаралды 8 М.
Numeric TextFields in SwiftUI
14:39
Stewart Lynch
Рет қаралды 8 М.
CY Superb Earphone 👌 For Smartphone Handset
0:42
Tech Official
Рет қаралды 826 М.
Что не так с LG? #lg
0:54
Не шарю!
Рет қаралды 23 М.
iOS 18 vs Samsung, Xiaomi,Tecno, Android
0:54
AndroHack
Рет қаралды 93 М.
Игровой Комп с Авито за 4500р
1:00
ЖЕЛЕЗНЫЙ КОРОЛЬ
Рет қаралды 1 МЛН
Телефон в воде 🤯
0:28
FATA MORGANA
Рет қаралды 1,2 МЛН