Michael Long
Nov 25, 2024

--

Depends on what you want to accomplish, I suppose. Result type could be a struct like the following.

struct PaginatedResults<T> {

let results: [T]

let more: (() -> Void)?

}

With more being a closure one could call to fetch more data. If no closure, no more data.

--

--

Michael Long
Michael Long

Written by Michael Long

I write about Apple, Swift, and SwiftUI in particular, and technology in general. I'm also a Lead iOS Engineer at InRhythm, a modern digital consulting firm.

No responses yet