Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add new API for PageView implementation in SwiftUI #666

Merged
merged 1 commit into from
Apr 2, 2023
Merged

Conversation

rechsteiner
Copy link
Owner

The new API replaces the PagingItem initializer with a new Page struct that let's you define custom header items per page. Each page can define their own custom SwiftUI view as the menu item, and it can be customized based on the selection and progress. The new API also supports result builders, which makes it easier to create PageViews with a fixed number of pages.

PageView {
    Page("Title 0") {
        Text("Page 0")
    }
    Page("Title 1") {
        Text("Page 1")
    }
}

The new API replaces the PagingItem initializer with a new Page struct
that let's you define custom header items per page. Each page can
define their own custom SwiftUI view as the menu item, and it can be
customized based on the selection and progress. The new API also
supports result builders, which makes it easier to create PageViews
with a fixed number of pages.
@rechsteiner rechsteiner merged commit d738017 into 4.0 Apr 2, 2023
@rechsteiner rechsteiner deleted the swiftui-api branch April 2, 2023 14:57
@rechsteiner rechsteiner mentioned this pull request May 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant