Skip to content

Commit 9afcbd1

Browse files
committed
Gather all views in views
1 parent ac4dbf1 commit 9afcbd1

15 files changed

+251
-22
lines changed

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,10 +50,11 @@ The various ``Onboarding`` types defines unique onboarding experience behaviors,
5050
* ``Onboarding.CorrectBehavior`` is presented when a user is not behaving as intended.
5151
* ``Onboarding.Delayed`` is presented after a certain number of presentation attempts.
5252

53-
OnboardingKit has various onboarding flows, and convenient ways to handle page state.
53+
OnboardingKit has various onboarding flows, and convenient ways to handle page state, for instance:
5454

5555
* An ``OnboardingPageView`` can be used to present manually scrolling pages.
5656
* An ``OnboardingSlideshow`` can be used to present an automatically progressing slideshow.
57+
* An ``OnboardingIntroScreen`` can be used to present a welcome screen on first app launch.
5758

5859
See the online [getting started guide][Getting-Started] for more information.
5960

Sources/OnboardingKit/OnboardingKit.docc/Getting-Started.md

Lines changed: 13 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -45,35 +45,29 @@ The onboarding will honor it's behavior and only call the presentation block whe
4545

4646
## Onboarding Flows
4747

48-
An onboarding flow is a collection of pages that can be presented in sequence. It can be a manually scrolling ``OnboardingPageView``, an automatically progressing ``OnboardingSlideshow``, a sequence of popovers, etc.
48+
An onboarding flow is a collection of pages that can be presented in sequence. You can wrap any flow control in an ``OnboardingFlowContainer`` to add toolbar and bottom buttons around it, and use an ``OnboardingFlowState`` to control the flow state.
49+
50+
51+
52+
## Views
53+
54+
OnboardingKit has flow views like ``OnboardingPageView`` and ``OnboardingSlideshow``, screen template views like ``OnboardingIntroScreen``, and smaller components like ``OnboardingPrimaryButton``, ``OnboardingVerticalProgressList``, etc.
4955

5056
@Row {
51-
@Column {}
5257
@Column {
5358
![A PageView screenshot](PageView)
5459
}
5560
@Column {
5661
![A Slideshow screenshot](Slideshow)
5762
}
58-
@Column {}
59-
}
60-
61-
You can wrap any flow control in an ``OnboardingFlowContainer`` to add toolbar and bottom buttons around the flow. You can use a ``OnboardingFlowState`` to control the flow state, instead of just using a plain integer binding.
62-
63-
64-
65-
## Onboarding Views
66-
67-
OnboardingKit has a set of standalone views, such as ``OnboardingIntroScreen`` and ``OnboardingPrimaryButton``. The views can be used as standalone views, and don't require any integration with the rest of the library.
68-
69-
@Row {
70-
@Column {}
71-
@Column {}
7263
@Column {
7364
![An IntroScreen screenshot](IntroScreen)
7465
}
75-
@Column {}
76-
@Column {}
7766
}
7867

79-
Views can be styled and configured with view modifiers that have the same prefix as the view. For instance, the ``OnboardingIntroScreen`` can be styled with ``SwiftUICore/View/onboardingIntroScreenStyle(_:)``
68+
You can use the smaller components in the larger ones, and style each component to great extent. For instance an ``OnboardingPageViewStyle`` can be applied with ``SwiftUICore/View/onboardingPageViewStyle(_:)`` to style an ``OnboardingPageView``.
69+
70+
71+
## Demo Application
72+
73+
Check out the demo application for examples on how these views can be used.
File renamed without changes.

Sources/OnboardingKit/Pages/OnboardingPageViewStyle.swift renamed to Sources/OnboardingKit/Views/OnboardingPageViewStyle.swift

File renamed without changes.

Sources/OnboardingKit/Slideshows/OnboardingSlideshow.swift renamed to Sources/OnboardingKit/Views/OnboardingSlideshow.swift

File renamed without changes.

Sources/OnboardingKit/Slideshows/OnboardingSlideshowConfiguration.swift renamed to Sources/OnboardingKit/Views/OnboardingSlideshowConfiguration.swift

File renamed without changes.

Sources/OnboardingKit/Slideshows/OnboardingSlideshowProgressView.swift renamed to Sources/OnboardingKit/Views/OnboardingSlideshowProgressView.swift

File renamed without changes.

Sources/OnboardingKit/Slideshows/OnboardingSlideshowStyle.swift renamed to Sources/OnboardingKit/Views/OnboardingSlideshowStyle.swift

File renamed without changes.

Sources/OnboardingKit/Views/OnboardingUspList.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99
import SwiftUI
1010

1111
/// This view can be used to list a collection of ``OnboardingUsp`` items.
12+
///
13+
/// This view can be styled with``SwiftUICore/View/onboardingUspListStyle(_:)`.
1214
public struct OnboardingUspList<UspIcon: View>: View {
1315

1416
public init(

Sources/OnboardingKit/Views/OnboardingUspListItem.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99
import SwiftUI
1010

1111
/// This view can be used to render an ``OnboardingUsp``.
12+
///
13+
/// This view can be styled with``SwiftUICore/View/onboardingUspListItemStyle(_:)`.
1214
public struct OnboardingUspListItem<UspIcon: View>: View {
1315

1416
public init(

0 commit comments

Comments
 (0)