Skip to content

Instantly share code, notes, and snippets.

View couchdeveloper's full-sized avatar

Andreas Grosam couchdeveloper

View GitHub Profile
@couchdeveloper
couchdeveloper / PageView.swift
Created January 6, 2023 13:37
SwiftUI PageView - a UIPageViewController with dynamic content
import SwiftUI
import Foundation
struct PageView<Page, PageContent: View>: View where
Page: Identifiable,
PageContent: Identifiable,
PageContent.ID == Page.ID
{
let uiViewControllerRepresentable: PageViewController<Page, PageContent>
@Binding var currentPage: Page