7 Comments
User's avatar
Alex Simpson-Davies's avatar

Your link to the Github repo at the end doesn't seem to be working!

Jacob Bartlett's avatar

Probably would have been good if I made the repo public 🥲 try now!

Lucas Derraugh's avatar

Nice use case and one I may adopt 😅

Jacob Bartlett's avatar

Thank you! Definitely quite a niche API

lpnpklyea's avatar

Couldn’t this be done with ScrollView and Group?

```

ScrollView {

Group {

// …

}

.inverted() // your implementation

}

.inverted() // your implementation

```

There’s also [Group\(subviews:transform:\)](https://developer.apple.com/documentation/swiftui/group/init\(subviews:transform:\)).

lpnpklyea's avatar

Couldn’t this be done with ScrollView and Group?

```

ScrollView {

Group {

// …

}

.inverted() // your implementation

}

.inverted() // your implementation

```

There’s also [Group\(subviews:transform:\)](https://developer.apple.com/documentation/swiftui/group/init\(subviews:transform:\)).

Mirko Tomic's avatar

In iOS 18 you can do this with new containers API, view builder is now iterable, but your implementation will probably work in more iOS versions.

https://developer.apple.com/documentation/SwiftUI/Creating-custom-container-views