Each week, I’ll share curated Swift and SwiftUI tips, tricks, and tutorials to elevate your iOS development journey. Here you will find a roundup of articles or videos, and personal insights into the evolving world of Swift and SwiftUI.
Whether you’re a seasoned developer or just starting, this is your one-stop hub to stay sharp, learn something new, and spark fresh ideas.
Articles
How to fix ZStack's views disappear transition not animated in SwiftUI
SarunW
If you have ever tried to animate a view’s visibility inside a ZStack
, you’ll notice that it can transition weirdly. The behaviour is zIndex
related, and this article goes in depth on the problem and possible solutions.
How to make views scroll with a custom transition
Hacking with Swift
A new API in iOS 17+ that provides animations on scroll within ScrollViews. I personally have used this to create a scrolling banner where the currently visible item is a bit scaled up. Technically I actually scale down the other items other than the primary visible one in the centre.
How to let users import videos using PhotosPicker
Hacking with Swift
Importing videos is a little bit more complicated than importing photos using SwiftUI’s PhotosPicker, but this article goes over it well.