Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
samdawes committed Feb 19, 2024
1 parent 5303d55 commit b4ebebe
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,11 @@ The following example shows a possible onboarding process. The segmented control
```swift
import SegmentedControlPageView

@State var currentSelection: Int = 0

SegmentedControlPageView(
"Onboarding Process"
"Onboarding Process",
selection: $currentSelection,
labels: [
"Welcome",
"Features",
Expand All @@ -22,6 +25,14 @@ SegmentedControlPageView(
]
)
```
If you'd like to use the page view without the segmented control, initialize a `PageView` in your project. This will fall back to a UIKit implementation for older versions of iOS, to ensure consistency on all versions.
```swift
PageView([
WelcomeView(),
FeaturesView(),
NextStepsView()
], selection: $currentSelection)
```

## Requirements
- iOS 13.0 or later
Expand Down

0 comments on commit b4ebebe

Please sign in to comment.