Hey Guys, In this article we’ll see how to create Two Directional SnapList. Creating a single directional snap list has become easier as we’ve “PageTabViewStyle” in TabView.

But implementing two directional snap list is still challenging as horizontal TabView inside a vertical TabView “.rotation(.degree(90))” can create some weird scroll bugs.

So we’ll use the same TabView for horizontal scrolling but we’ll add them in a vertical ScrollView and create a custom snap behaviour to the ScrollView cell.

There are other methods like creating a VStack modifier and adjusting it’s offset based on DragGesture, but that method also creates issues as…

Sameer Nawaz

iOS Engineer  | Open Source Contributor ✨

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store