now that maybe you guys could use this: @Environment(\.dismiss) var dismiss and add these codes in the Button's action: dismiss.callAsFunction() cause presentionMode is about to deprecate. By the way, really loves your tutorials Nick, hope you continue with that!~ Best regards.
Hi Nick, with SwiftUI 6.0 ( or earlier ), you don't need an ZStack and zIndex, it's enough to put the new View to an VStack. VStack(){ if showTransition { NewScreen2(isDisplayed: $showTransition) .padding(.top, 20) .transition(.move(edge: .bottom)) } } .animation(.spring(), value: showTransition) VStack(){ NewScreen2(isDisplayed: $showAnimation) .padding(.top,20) .offset(y: showAnimation ? 0 : UIScreen.main.bounds.height) } .animation(.spring(), value: showAnimation)
Thank you very much , I add .animation(.spring(), value: showTransition) next to .transition(.move(edge: .bottom), and it doesn't work right... I copied your code it works perfectly! but do you know the reason why my way doesn't work?
Thanks for that interim repetition. Really clever and well down. Thanks, Nick. Would be great if you could add to your "older" videos any big change of depreciation. I know its work, but would help a lot. e.g. animation had changed since iOS 15. Thanks nevertheless for all your good work
Nick, I've been learning a lot from you!! Excellent content and a way to teach!! I have a question; now, in iOS 15.0, .animation was deprecated. Can you explain to us how to use the "value" parameter? Example: .animation(.spring(), value: V), thanks in advance!!! 😄
I had trouble doing the last two transition methods using swiftui's default tabview. I was wondering if you need a custom tabview in order to make them work or if I might be missing something here. Thank you so much! your videos are so clear and good
If you're using the default TabView, it's probably best to stick with the default animations. You will have to make your own custom tab view if you want custom transitions unfortunately!
Thanks, but I prefer the sheet because it has all the necessary functions. I think the Cons of transition are that you have to add the close drag gesture and background dismiss manually.
Thanks again Nick for this insightful video! If I understood this right, I would use Sheets for complex covers ( with lots of content and potential navigation controls starting from that sheet0, Transitions for filters, small popups with few buttons, actionable within same main screen via binding and so so, and Animations for really small items, like tool tips, helper notes, info tips for sections. What do you think ?
Is there a way to change the color of the background of the main screen when sheet is presenting? So you have your orange main screen, then you use sheet to present the purple, so in minute 6:29 it looks: the purple in front, then the orange pushed back a little & it shows a white background, is there a way to change that color? I know I can use fullscreencover but just as a general doubt is there a way to achieve that?
Awesome video! This has helped my app design look tons better! I have a question though. I go to round the top corners (I've tried different methods) all of which add a sort of padding to the bottom of the view so it's not flush with the bottom anymore. Any idea on how to fix this?
Curious if there is any performance implications for the animation offset version? Does swift lazy render the view, (like only put the view in memory once the display condition is true)?
What if I want to use the second option with Transition and doing something like that : "I want to click the text, it opens a 'fake' sheet view and I want to but inside of it a button that it shows me a new view without compromising with the padding and be full screen the next" The sequence are : View 1 (click button) -> View 2 opens fake sheet (with the padding) and I click inside of it continue to next view -> View 3 it shows me a new page full screen ?
Hi Nick, great channel, love your videos and learning loads. Quick question (and I spent something like 3hrs looking for a fix) but method 2 throws the ".animation deprecated as of ios15, use value:", but whenever I do there is no animation going on at all. Would appreciate any help as it is giving me a headache, not being able to wrap my head around what the new method is supposed to be.
hi Nick, Thank you for the awesome video. I have a problem with animation in xcode 14, it didn't work in the preview nor in the simulator. I tried different combinations (implicit and explicit) but it never worked. can you help please.
Great video! I wonder about one thing, though: Why does the transition work, even when the zIndex line is blanked out? It seems that this line is unnecessary.
Haha yes it does, but sometimes when transitioning off of the screen, it will get rendered underneath the other layers and you won't be able to see the full animation. If it's working for you without the zIndex, then you probably don't need it. It's just a very common issue I wanted to address.
@@SwiftfulThinking Ok, thanks. I plan to see all of your bootcamp and probably some of your other ones. You are very thorough and your videos are very well planned and executed. Keep up the good work 😃
Do not be so upset! If you do instead of .animation(...blah). this -it will work: Button("Button", action: { withAnimation(.easeInOut(duration: 2)) { showNewScreen.toggle() } })
Videos like this are very useful to understand different methods to do the same thing and which circumstances are best for each method.
Glad it was helpful!
Excellent Nick. This has really helped me.
I like your videos - they are digestable snippets.
now that maybe you guys could use this:
@Environment(\.dismiss) var dismiss
and add these codes in the Button's action:
dismiss.callAsFunction()
cause presentionMode is about to deprecate.
By the way, really loves your tutorials Nick, hope you continue with that!~
Best regards.
Compared to paid courses, this course is better
Your all video are good. And contains deep details
Thanks Mark! Happy to help.
This video is very practical, such as add or remove subview , which is essentially
different with UIKit
Hey, I've just found your channel and now I'm binge-watching it :) good work!
Hey Luigi! Thanks for watching :)
man you are my favorite , thank you so much and I hope we can help you like you did for us
Excellent lesson...
Hi Nick, with SwiftUI 6.0 ( or earlier ), you don't need an ZStack and zIndex, it's enough to put the new View to an VStack.
VStack(){
if showTransition {
NewScreen2(isDisplayed: $showTransition)
.padding(.top, 20)
.transition(.move(edge: .bottom))
}
} .animation(.spring(), value: showTransition)
VStack(){
NewScreen2(isDisplayed: $showAnimation)
.padding(.top,20)
.offset(y: showAnimation ? 0 : UIScreen.main.bounds.height)
} .animation(.spring(), value: showAnimation)
Thank you very much , I add .animation(.spring(), value: showTransition) next to .transition(.move(edge: .bottom), and it doesn't work right... I copied your code it works perfectly! but do you know the reason why my way doesn't work?
@@savokid328 hi as far as I know it’s a question of order of the layers. Never dived into it deeper.
You are excellent bro the way you presenting is just awsome ❤❤
Thanks Prasad 😎
Very nice ! I am learning so much .
Thanks for watching Andrew!
Very useful tutorial. Thank you!
Thanks for that interim repetition. Really clever and well down. Thanks, Nick. Would be great if you could add to your "older" videos any big change of depreciation. I know its work, but would help a lot. e.g. animation had changed since iOS 15. Thanks nevertheless for all your good work
I’ve appended videos to the end of the playlists for everything deprecated 👍 iOS 16 animation here:
ua-cam.com/video/t95HGRLPwj0/v-deo.html
Great video ! Very helpful thank you Nick.
Nick, I definitely learned swiftui from you. thank you in advance ❣️
Nick, I've been learning a lot from you!! Excellent content and a way to teach!!
I have a question; now, in iOS 15.0, .animation was deprecated. Can you explain to us how to use the "value" parameter? Example: .animation(.spring(), value: V), thanks in advance!!!
😄
The animation is only applied when the value changes!
Great video!! Thank you!!
keep doing what you doing
amazing, thank you so much!
An excellent video. Thank you so much
I had trouble doing the last two transition methods using swiftui's default tabview. I was wondering if you need a custom tabview in order to make them work or if I might be missing something here. Thank you so much! your videos are so clear and good
If you're using the default TabView, it's probably best to stick with the default animations. You will have to make your own custom tab view if you want custom transitions unfortunately!
Thanks, but I prefer the sheet because it has all the necessary functions. I think the Cons of transition are that you have to add the close drag gesture and background dismiss manually.
Thanks again Nick for this insightful video! If I understood this right, I would use Sheets for complex covers ( with lots of content and potential navigation controls starting from that sheet0, Transitions for filters, small popups with few buttons, actionable within same main screen via binding and so so, and Animations for really small items, like tool tips, helper notes, info tips for sections. What do you think ?
You are great!
Thanks man!!
You forgot about another method which you showed us in previous video - fullScreenCover :)
Crazy good. Thanks
💧water has cleared, there is hope for me.
Is there a way to change the color of the background of the main screen when sheet is presenting? So you have your orange main screen, then you use sheet to present the purple, so in minute 6:29 it looks: the purple in front, then the orange pushed back a little & it shows a white background, is there a way to change that color? I know I can use fullscreencover but just as a general doubt is there a way to achieve that?
I think sheet is good , I was like use offset,I want to change all of them to sheet, thanks Bro
perfect
Awesome video! This has helped my app design look tons better! I have a question though. I go to round the top corners (I've tried different methods) all of which add a sort of padding to the bottom of the view so it's not flush with the bottom anymore. Any idea on how to fix this?
You probably need to ignore the safe area
This is awesome
Is possible to use sheet with different transition? Like sheet opens Right to left
Thank you....
You're welcome Andrej
wow Cool!
Ok I first watched this 5mths ago, I'm back to see if I've learnt anything...
Curious if there is any performance implications for the animation offset version? Does swift lazy render the view, (like only put the view in memory once the display condition is true)?
What if I want to use the second option with Transition and doing something like that :
"I want to click the text, it opens a 'fake' sheet view and I want to but inside of it a button that it shows me a new view without compromising with the padding and be full screen the next"
The sequence are : View 1 (click button) -> View 2 opens fake sheet (with the padding) and I click inside of it continue to next view -> View 3 it shows me a new page full screen ?
Hey Davide, yea you can definitely do something like that!
@@SwiftfulThinking how?
Wont the transition and animation keep the second screen in memory even when off the screen ?
Perfect!
Hi Nick, great channel, love your videos and learning loads. Quick question (and I spent something like 3hrs looking for a fix) but method 2 throws the ".animation deprecated as of ios15, use value:", but whenever I do there is no animation going on at all. Would appreciate any help as it is giving me a headache, not being able to wrap my head around what the new method is supposed to be.
Check this out ua-cam.com/video/t95HGRLPwj0/v-deo.html
why zstack can fix the transition problems?
Why do I feel like I know this guy from somewhere. You from Michigan??
Should we delete @Environment from the struct view, in Method 2 and Method 3,
as we don't use it anymore?
yes, you right!
Does UIScreen still exist because I can not seem to make it work? If it is deprecated what should I use instead?
UIScreen still exist and work. but UIScreen.main will be deprecated, so in the new way i use GeometryReader. and its perfectly work.
hi Nick, Thank you for the awesome video. I have a problem with animation in xcode 14, it didn't work in the preview nor in the simulator. I tried different combinations (implicit and explicit) but it never worked. can you help please.
SUP BRO...😇
I use Sheet, but I like animation offset, Transition is more complicated
Yea, sheet is definitely the easiest however it's also the least customizable! I find that I'm using the .transition more and more these days :)
Great video! I wonder about one thing, though: Why does the transition work, even when the zIndex line is blanked out? It seems that this line is unnecessary.
Haha yes it does, but sometimes when transitioning off of the screen, it will get rendered underneath the other layers and you won't be able to see the full animation. If it's working for you without the zIndex, then you probably don't need it. It's just a very common issue I wanted to address.
@@SwiftfulThinking Ok, thanks. I plan to see all of your bootcamp and probably some of your other ones. You are very thorough and your videos are very well planned and executed. Keep up the good work 😃
main modifier will be deprecated in future ios versions. Better use GeometryReader and adjust its frame both max h/w to infinity
How would we implement GeometryReader in this context?
The transition just does not work for me. Don't know why. Makes me frustrated >.
Do not be so upset! If you do instead of .animation(...blah). this -it will work:
Button("Button", action: {
withAnimation(.easeInOut(duration: 2)) {
showNewScreen.toggle()
}
})
Поповер)
I fucking love yooooooooou
Duuuuuuuuuuuuuuudddddeeeee 🫶
Method 2
well... that was clear as mud! Maybe if I watch the video a dozen more times it will sink in! That didn't work... haha
really thank you very much 🤎🤎