New SwiftUI package drop!
📦📖 BigUIPaging
PageView is a flexible container for creating paged interfaces.
Unlike TabView:
- Pages can be decided 'in flight’, ideal for large datasets
- Works across iOS and macOS
- Handles complicated view hierarchies more consistently
- Allows for totally custom styles and interactions
Also included is PageIndicator with support for the new iOS 17 progress timer.
Had a few people ask how you might go from a scrolling grid to a PageView, à la Photos app.
Using matchedGeometry will get you most of the way there, then it’s just a few little extras to keep both views in sync.
I’ve added some new sample code in the project to show how:
@phill I just saw your app appear in my home feed and I thought it was Yandex Mail. 🙊
The logos aren’t too similar, but maybe the colour scheme is. 🎨
@matt orange is the new black
@phill How would this handle.. a hundred thousand items?
@BenRiceM all the styles are lazy loaded, so go for it!
(⚠️ NOT SO BIG LTD cannot be held liable for thumb injuries sustained from all that swiping)
@BenRiceM that said, if you do have a very big data set it’s best to use the next/previous initialiser instead of the ForEach.
In Big Mail I’ve mapped the next/prev closure to a DB call that returns the next message ID.
@phill Looks sharp!
@phill looking awesome! this could help me quite a bit with one of the feature I was considering 🙌
@phill absolutely love seeing a small, well-focused library. This is my kind of design 🤩
@phill beautiful!
@phill This kicks so much ass and is exactly what I needed!
@phill This is amazing.
Certain styles such as .scroll and .historyStack bridge directly to UIPageViewController and NSViewController respectively, so you get all those great native behaviours.
But you can also adopt PageViewStyle to create completely custom transitions, like the 3D deck of cards in Messages.
Checkout the docs to see how:
https://opensource.notsobig.company/documentation/bigswiftui/pageviewstyle/