Skip to content

Commit b4ebebe

Browse files
authored
Update README.md
1 parent 5303d55 commit b4ebebe

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

README.md

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,11 @@ The following example shows a possible onboarding process. The segmented control
88
```swift
99
import SegmentedControlPageView
1010

11+
@State var currentSelection: Int = 0
12+
1113
SegmentedControlPageView(
12-
"Onboarding Process"
14+
"Onboarding Process",
15+
selection: $currentSelection,
1316
labels: [
1417
"Welcome",
1518
"Features",
@@ -22,6 +25,14 @@ SegmentedControlPageView(
2225
]
2326
)
2427
```
28+
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.
29+
```swift
30+
PageView([
31+
WelcomeView(),
32+
FeaturesView(),
33+
NextStepsView()
34+
], selection: $currentSelection)
35+
```
2536

2637
## Requirements
2738
- iOS 13.0 or later

0 commit comments

Comments
 (0)