Oddbean new post about | logout
 I used the new #SwiftUI `scrollTargetBehavior(.paging)` API in Wallaroo 1.4 (https://wallaroo.app). It's so much nicer than the hacked up `TabView` and `GeometryReader` stuff I used previously. (Sadly the old one is still used on older OSes because the new API requires iOS 17 / macOS 14.)

There was one thing that threw me off for a couple hours, though: The inner container (`LazyHStack` in our case) absolutely needs to have spacing explicitly set to 0 or else the pages won't land correctly!

https://files.mastodon.social/media_attachments/files/111/138/798/696/116/596/original/44728ac34c102659.png