SwiftUI ScrollView Centered Items with ScrollTargetBehavior
Let’s make a ScrollView show a bunch of views horizontally, and center each one as the user scrolls, while also showing edges of adjacent ones. In a hurry to get the entire code? It’s at the bottom of the article.
Any time a ScrollView scrolls, it c...
articles.danielkasaj.com2 min read