SwiftUI library for a walkthrough or onboarding flow with tap actions

Overview

Concentric Onboarding

iOS library for a walkthrough or onboarding flow with tap actions written with SwiftUI


We are a development agency building phenomenal apps.




Twitter Version Carthage Compatible License Platform

Usage

  1. Create View's descendant class for your pages.
  2. Create at least two pages and fill them with content.
  3. Create an array of colors (same number as pages).
  4. Create ConcentricOnboardingView and place it in your view hierarchy.
struct ContentView: View {
    var body: some View {
        return ConcentricOnboardingView(pages: <your_pages>, bgColors: <your_colors>)
    }
}
  1. Pass duration as an argument if you want animation to be faster/slower
ConcentricOnboardingView(pages: <your_pages>, bgColors: <your_colors>, duration: 2.0)

Public interface

currentPageIndex - read only property to check what page index you are currently on

goToNextPage(animated: Bool = true) - call this method manually if you need to
goToPreviousPage(animated: Bool = true) - call this method manually if you need to

Assignable closures

animationWillBegin - called before animation starts
animationDidEnd - called after animation ends
didGoToLastPage - called after animation leading to last page ends
insteadOfCyclingToFirstPage - replaces default navigation to first page after pressing next on last page
insteadOfCyclingToLastPage - replaces default navigation to last page after pressing prev on first page while navigating backwards
didPressNextButton - replaces default button action with user's custom closure

Examples

To try ConcentricOnboarding examples:

  • Clone the repo https://github.com/exyte/ConcentricOnboarding.git
  • Open terminal and run cd <ConcentricOnboardingRepo>/Example/
  • Run pod install to install all dependencies
  • Run open ConcentricOnboardingExample.xcworkspace/ to open project in the Xcode
  • Try it!

Installation

CocoaPods

To install ConcentricOnboarding, simply add the following line to your Podfile:

pod 'ConcentricOnboarding'

Carthage

To integrate ConcentricOnboarding into your Xcode project using Carthage, specify it in your Cartfile

github "Exyte/ConcentricOnboarding"

Manually

Drop ConcentricOnboardingView.swift in your project.

Requirements

  • iOS 13+
  • Xcode 11+

Acknowledgements

Many thanks to Cuberto team for the design idea and inspiration.

Comments
  • Question on how to use ...

    Question on how to use ...

    Thanks for this very nice Onboarding Screen. My question is related how you envision to leave the cycle after cycling through e.g. 4 screens and then navigate to different screen. I also wonder if you thought about how to perform different actions between the different screens, e.g. asking for Location service permission, Phone book permission, PushNotification permission

    Thanks Armin

    opened by wowo4k 8
  • Example code does not working

    Example code does not working

    Hi, I used xcode 13.3, MacOS 12.4 with M1. The 2nd screen does not show up correctly. Below is what I see.

    The result comes from the example code, no change at all.

    Screen Shot 2022-07-28 at 5 17 52 PM
    opened by TheGatesOfParadise 2
  • Issue with Swift Package Manager: Invalid Manifest

    Issue with Swift Package Manager: Invalid Manifest

    I tried to import this library multiple times, but alway get the same error:

    invalidManifestFormat("/var/folders/hq/xht3hkxj0sj9dmb9l8_s5zm40000gn/T/TemporaryFile.CbTs13.swift:8:15: error: 'v14' is unavailable\n .iOS(.v14)\n ^~~\nPackageDescription.SupportedPlatform:49:27: note: 'v14' was introduced in PackageDescription 5.3\n public static var v14: PackageDescription.SupportedPlatform.IOSVersion\n ^", diagnosticFile: Optional(AbsolutePath:"/Users/dimaprivat/Library/Developer/Xcode/DerivedData/MindMends-dhvxmufwqyjuymghawxgovoejhaf/SourcePackages/ManifestLoading/concentriconboarding.dia")) in https://github.com/exyte/ConcentricOnboarding

    Does it not work with iOS 14?

    opened by GrosserStuhl 2
  • Not working when importing with swift package manager

    Not working when importing with swift package manager

    Hey there ! I tried importing this library inside my project using the swift package manager. Import worked well but there's a lot of compiler error, as you can see on this: print screen.

    Screenshot 2020-10-11 at 11 16 39

    I'm on Xcode 12.0.1 and my project is targeting iOS 13.4+

    As a workaround I installed the file manually and it's working.

    opened by RosayGaspard 2
  • Accessibility of Views

    Accessibility of Views

    Hi this looks beautiful and I would love to add it to my app. I didn't read any mention about the accessibility component. Is the accessibility using VoiceOver working properly for these views as well? Thank you!

    opened by saamerm 1
  • updates on adding next icon to the next circle button.

    updates on adding next icon to the next circle button.

    I made a modification to the next circle button, I read through the source code I discovered the circle button looked for asset file name "arrow" In most cases people might not know they are supposed to add an arrow image asset file into their project. so I made a modification to use system next arrow Icon and also user can set their prefered next Icon button from the nextIcon prop in the ConcentricOnboarding struct...

    please review the PR and if there is anything needed let me know I will modify it.. and also below is the screenshot of what it looks like...

    Screenshot 2021-01-21 at 4 48 06 AM

    opened by DAMMAK 1
  • Navigate to another swiftui view in the insteadOfCyclingToFirstPage callback

    Navigate to another swiftui view in the insteadOfCyclingToFirstPage callback

    Hello In the callback a.insteadOfCyclingToFirstPage = { print("do your thing") } how can i move to a new swiftUI View. In this point I don't have any navigationView or NavigationLink. For example if i use something like that:

    a.insteadOfCyclingToFirstPage = { MyView() } doesn't do anything (and i think its normal). I receive as warning Result of 'MyView' initializer is unused

    Thanks

    opened by anestis1000 1
  • support swipe

    support swipe

    it would be great to add support for swipes, disable the button at the bottom to switch to the next screen and turn off the background color animation, but so that the animation of switching to the next screen remains and add indicator pages?

    opened by xakacuk 1
  • Default next button is invisible

    Default next button is invisible

    case .onboardingPage:
                if (val != nil) {
                    HomeView()
                } else {
                    ConcentricOnboardingView(pageContents: onboardingPages ).duration(1.0).nextIcon("chevron.forward")
                        .insteadOfCyclingToFirstPage {
                        viewRouter.currentPage = .signInPage
                    }
                }
            }
    

    This is the area where I expect to see the chevron.forward default next button, but I don't see it.

    image
    opened by rohandalvi 1
Owner
Exyte
Exyte
SwiftyWalkthrough is a library for creating great walkthrough experiences in your apps, written in Swift.

SwiftyWalkthrough is a library for creating great walkthrough experiences in your apps, written in Swift. You can use the library to allow users to navigate and explore your app, step by step, in a predefined way controlled by you.

Rui Costa 370 Nov 24, 2022
Awesome tool for create tutorial walkthrough or coach tour

AwesomeSpotlightView is a nice and simple library for iOS written on Swift 5. It's highly customizable and easy-to-use tool. Works perfectly for tutor

Alexander Shoshiashvili 309 Jan 5, 2023
An iOS framework to easily create simple animated walkthrough, written in Swift.

Intro Overview An iOS framework to easily create simple animated walkthrough, written in Swift. Requirements iOS8 Installation with CocoaPods Intro is

Nurdaulet Bolatov 33 Oct 1, 2021
iOS library Paper Onboarding is a material design UI slider written on Swift.

iOS library Paper Onboarding is a material design UI slider written on Swift. We specialize in the designing and coding of custom UI

Ramotion 3.2k Jan 5, 2023
DeliveryOnboardingSwiftUI - A Delivery Onboarding screen made with SwiftUI

DeliveryOnboardingSwiftUI Its a Onboarding screen made with SwiftUI

null 1 Feb 5, 2022
OnboardKit - Customizable user onboarding for your UIKit app in Swift

OnboardKit Customizable user onboarding for your UIKit app in Swift Requirements Swift 5.0 Xcode 10 iOS 11.0+ Installation Carthage github "NikolaKire

Nikola Kirev 470 Dec 23, 2022
A swifty iOS framework that allows developers to create beautiful onboarding experiences.

SwiftyOnboard is being sponsored by the following tool; please help to support us by taking a look and signing up to a free trial SwiftyOnboard A simp

Juan Pablo Fernandez 1.2k Jan 2, 2023
An iOS framework to easily create a beautiful and engaging onboarding experience with only a few lines of code.

Onboard Click Here For More Examples Important Onboard is no longer under active development, and as such if you create any issues or submit pull requ

Mike 6.5k Dec 17, 2022
An animated popover that pops out a given frame, great for subtle UI tips and onboarding.

Animated popover that pops out of a frame. You can specify the direction of the popover and the arrow that points to its origin. Color, border radius

Andrea Mazzini 3k Jan 8, 2023
Configurable animated onboarding screen written programmatically in Swift for UIKit

Configurable animated onboarding screen written programmatically in Swift for UIKit – inspired by many Apple-designed user interfaces in iOS – with Insignia as an example.

Lukman “Luke” Aščić 370 Dec 27, 2022
BWWalkthrough is a simple library that helps you build custom walkthroughs for your iOS App

What is BWWalkthrough? BWWalkthrough (BWWT) is a class that helps you create Walkthroughs for your iOS Apps. It differs from other similar classes in

Yari @bitwaker 2.8k Jan 4, 2023
VideoSplashKit - UIViewController library for creating easy intro pages with background videos

VideoSplashKit - Video based UIViewController Introduction Requires iOS 8 or later and Xcode 6.1+ Swift support uses dynamic frameworks and is therefo

Sahin Boydas 1.2k Dec 28, 2022
Simple coach mark library written in Swift

Minamo Simple coach mark library written in Swift Usage Initialize let rippeleView = RippleView() rippeleView.tintColor = UIColor(red: 0.3, green: 0.7

yukiasai 248 Nov 24, 2022
SwiftUI library for a walkthrough or onboarding flow with tap actions

Concentric Onboarding iOS library for a walkthrough or onboarding flow with tap actions written with SwiftUI We are a development agency building phen

Exyte 956 Jan 4, 2023
Onboarding - Completed project for creating Onboarding screens in SwiftUI

Onboarding Completed project for creating Onboarding screens in SwiftUI.

Khawlah Bawazir 0 Jan 13, 2022
FCLAuthSwift is a Swift library for the Flow Client Library (FCL) that enables Flow wallet authentication on iOS devices.

FCLAuthSwift is a Swift library for the Flow Client Library (FCL) that enables Flow wallet authentication on iOS devices. Demo The demo a

Zed 3 May 2, 2022
UDF (Unidirectional Data Flow) is a library based on Unidirectional Data Flow pattern.

UDF (Unidirectional Data Flow) is a library based on Unidirectional Data Flow pattern. It lets you build maintainable, testable, and scalable apps.

inDriver 51 Dec 23, 2022
Blueprints is a collection of flow layouts that is meant to make your life easier when working with collection view flow layouts.

Blueprints is a collection of flow layouts that is meant to make your life easier when working with collection view flow layouts. It comes

Christoffer Winterkvist 982 Dec 7, 2022
Make your logic flow and data flow clean and human readable

Flow What's Flow Flow is an utility/ design pattern that help developers to write simple and readable code. There are two main concerns: Flow of opera

null 18 Jun 17, 2022
SwiftyWalkthrough is a library for creating great walkthrough experiences in your apps, written in Swift.

SwiftyWalkthrough is a library for creating great walkthrough experiences in your apps, written in Swift. You can use the library to allow users to navigate and explore your app, step by step, in a predefined way controlled by you.

Rui Costa 370 Nov 24, 2022