Follow

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.

github.com/notsobigcompany/Big

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:

opensource.notsobig.company/do

This is the first of many packages from Big Mail and Big News that I’ll be open sourcing over the coming weeks.

It’s also my first time open sourcing anything this big, so feedback whilst I get the hang of things is appreciated!

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:

github.com/notsobigcompany/Big

@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. 🎨

@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.

@BenRiceM @phill I’ll do an equally unfair/harsh follow up… can it handle being dropped in the _middle_ of a 100k list of items and be able to swipe to either edge with no hint of a stutter?

@BenRiceM @phill in all seriousness (although the question is serious), regardless, this is amazing! Can’t wait for what you will share next.

@bardi @BenRiceM there are some things us mere mortals just aren't meant to know.

@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 This kicks so much ass and is exactly what I needed!

Sign in to participate in the conversation
The Not So Big Company

The home of The Not So Big Company on Mastodon.