Pretty awesome tutorial. A couple of issues I have ran into though are,: The alert always appears when the view is first loaded, and cannot be re-shown once dismissed. Simply removing onAppear and replacing with onChange(of: isActive) and used an if statement fixed that. The other issue is that using ZStack does in fact allow me to click on the background to dismiss it, and even looks cool (by making everything else look inactive) but everything else IS inactive and remains inactive or un-clickable even after the popup is dismissed, and that issue I am still looking for a solution.
@@KhanhQuang-ff2ve good catch! This issue is being caused by the animation while changing the isActive. The easiest solution would be to disable the close for background tap gesture, or disable the animation for this case 👍
Concise and informative. Love it. Thank you!
Glad it was helpful! 🤗
Super useful as usual. Thanks for the video Mike! 🙌
Thanks! 🙌
This video helped me a lot. Thanks.
You're very welcome! I'm glad the video was helpful!
Great work man.
Thanks!
Awesome!
Pretty awesome tutorial. A couple of issues I have ran into though are,:
The alert always appears when the view is first loaded, and cannot be re-shown once dismissed. Simply removing onAppear and replacing with onChange(of: isActive) and used an if statement fixed that.
The other issue is that using ZStack does in fact allow me to click on the background to dismiss it, and even looks cool (by making everything else look inactive) but everything else IS inactive and remains inactive or un-clickable even after the popup is dismissed, and that issue I am still looking for a solution.
Figured out a solution! I wrapped the Color portion just under ZStack in if (isActive) and that fixed the issue. Thank you again for the tutorial!
That's awesome! I will be working on a new version soon. I will take your changes into consideration. Thanks! 🙌
For anyone looking to use this on your views, another way is to just change the same view to a ViewModifier and show with a transition using modifier
That's a good idea, thanks!
I tried it and it has a bug when I click Show popup multiple times and it doesn't show the dialog but only shows the background dialog@@mikemikina
@@KhanhQuang-ff2ve good catch! This issue is being caused by the animation while changing the isActive. The easiest solution would be to disable the close for background tap gesture, or disable the animation for this case 👍
Great video! One can simplify code for xmark (10:11) by using overlay with topTrailing alignment. This would eliminate VStack, HStack and Spacers.
That's a great tip! I have just added it to the Github repo. Thanks! 🙌
Nice 👍
All this time I thought apple was using secret code to make those cute modal overlays. they were just hiding the views???
Me too! Just learned this. My only concern would be memory issues.
@@grapejuice04 See my comment.