A simple and attractive AlertView to onboard your users in your amazing world.

Overview

AlertOnboarding

A simple and attractive AlertView to onboard your users in your amazing world.

Platform Language License

PRESENTATION

This AlertOnboarding was inspired by this amazing dribbble. It will help you to maximise, simply, onboarding process on your app.

DEMO

INSTALLATION

####COCOAPODS

pod 'AlertOnboarding'

USAGE

//First, declare datas
var arrayOfImage = ["image1", "image2", "image3"]
var arrayOfTitle = ["CREATE ACCOUNT", "CHOOSE THE PLANET", "DEPARTURE"]
var arrayOfDescription = ["In your profile, you can view the statistics of its operations and the recommandations of friends",
"Purchase tickets on hot tours to your favorite planet and fly to the most comfortable intergalactic spaceships of best companies",
"In the process of flight you will be in cryogenic sleep and supply the body with all the necessary things for life"]

//Simply call AlertOnboarding...
var alertView = AlertOnboarding(arrayOfImage: arrayOfImage, arrayOfTitle: arrayOfTitle, arrayOfDescription: arrayOfDescription)

//... and show it !
alertView.show()

//And maybe, if you want, you can hide it.
alertView.hide()

CUSTOMIZING

You have to set options BEFORE call show() function.

//Modify background color of AlertOnboarding
self.alertView.colorForAlertViewBackground = UIColor(red: 173/255, green: 206/255, blue: 183/255, alpha: 1.0)

//Modify colors of AlertOnboarding's button
self.alertView.colorButtonText = UIColor.whiteColor()
self.alertView.colorButtonBottomBackground = UIColor(red: 65/255, green: 165/255, blue: 115/255, alpha: 1.0)

//Modify colors of labels
self.alertView.colorTitleLabel = UIColor.whiteColor()
self.alertView.colorDescriptionLabel = UIColor.whiteColor()

//Modify colors of page indicator
self.alertView.colorPageIndicator = UIColor.whiteColor()
self.alertView.colorCurrentPageIndicator = UIColor(red: 65/255, green: 165/255, blue: 115/255, alpha: 1.0)

//Modify size of alertview (Purcentage of screen height and width)
self.alertView.percentageRatioHeight = 0.5
self.alertView.percentageRatioWidth = 0.5

//Modify labels
self.alertView.titleSkipButton = "PASS"
self.alertView.titleGotItButton = "UNDERSTOOD !"

TRACKING EVENTS

If you want to know when the user completes onboarding, skips onboarding, or triggers the next step, you can use the AlertOnboardingDelegate to listen for these updates.

//Add delegate to your ViewController
class ViewController: UIViewController, AlertOnboardingDelegate

//... when initialising AlertOnboarding
alertView.delegate = self

//... inside your class that conforms to AlertOnboardingDelegate
func alertOnboardingSkipped(currentStep: Int, maxStep: Int) {
    print("Onboarding skipped the \(currentStep) step and the max step he saw was the number \(maxStep)")
}

func alertOnboardingCompleted() {
   print("Onboarding completed!")
}

func alertOnboardingNext(nextStep: Int) {
   print("Next step triggered! \(nextStep)")
}

FEATURES

  • Multi-Device Full Support
  • Rotation Support
  • Swift 3 Support
  • Fully customisable
  • Tracking Events

Version

2.0

Author

Philippe BOISNEY (phil.boisney(@)gmail.com)

Design

Sasha Gorosh

Comments
  • Could not cast value of type 'AlertOnboarding.AlertChildPageViewController'

    Could not cast value of type 'AlertOnboarding.AlertChildPageViewController'

    Hi Philippe and thank You for Your job.

    I'm trying to use AlertOnboarding on my project but I receive the error:

    Could not cast value of type 'AlertOnboarding.AlertChildPageViewController' (0x10d8b53f8) to 'Surf_Shop.AlertChildPageViewController' (0x10d2a6da8).

    on:

    pageContentViewController = UINib(nibName: "AlertChildPageViewController", bundle: nil).instantiateWithOwner(nil, options: nil)[0] as! AlertChildPageViewController

    while the master project works fine.

    Could You help me please to solve it? Thank You very much Kind regards Fabio

    opened by fabioiegri 5
  • Add delegate for callbacks

    Add delegate for callbacks

    I've added a delegate that provides callbacks that are fired when onboarding has been completed, skipped, or when the next step has been triggered.

    This can be useful for analytics, or for integrating the onboarding with a request for location permissions (for example).

    opened by mattmcneeney 2
  • alertView.show() not working in UIViewController

    alertView.show() not working in UIViewController

    Following the usage I can't get this to work. Calling it from my viewDidLoad() in iOS 9.0 installed using cocoapods.

    After calling alertView.show(), print(alertView) shows:

    <AlertOnboarding.AlertOnboarding: 0x144d43e00; frame = (0 0; 0 0); clipsToBounds = YES; layer = <CALayer: 0x144d338f0>>
    

    Am I doing anything wrong or do I need to do something else?

    opened by DJM0 2
  • PageControl Indicator not showing

    PageControl Indicator not showing

    PageControl indicator doesn't show when purcentageRatioHeight is less than default (0.8).

    The error seems to be on AlertPageViewController:

        let alertViewSizeHeight = UIScreen.mainScreen().bounds.height*0.8
    

    It must be:

        let alertViewSizeHeight = UIScreen.mainScreen().bounds.height*alertview.purcentageRatioHeight
    

    Thanks

    opened by xradeon 2
  • Double page control

    Double page control

    I wanted to show the alert with some transparency so I used the next settings:

            let alpha: CGFloat = 0.82
            let blueAlpha = UIColor(red: 3/255, green: 169/255, blue: 244/255, alpha: alpha)
    
            alertView.colorForAlertViewBackground = UIColor(white: 0, alpha: alpha)
            alertView.colorButtonText = UIColor(white: 1, alpha: alpha)
            alertView.colorButtonBottomBackground = blueAlpha
            alertView.colorTitleLabel = UIColor(white: 1, alpha: alpha)
            alertView.colorDescriptionLabel =  UIColor(white: 1, alpha: alpha)
            alertView.colorPageIndicator =  UIColor(white: 1, alpha: alpha)
            alertView.colorCurrentPageIndicator = blueAlpha
    

    But then the page control background area was darkened. I realized that the backgroundColor of the page control was the same used in the alert view, so I made a quick mod to the next line in AlertPageViewController:

        self.pageControl.backgroundColor = alertview.colorForAlertViewBackground
    

    to

        self.pageControl.backgroundColor = UIColor.clearColor()
    

    Now it seems like there are two page controls overlapped.

    opened by xradeon 2
  • Swift Legacy Problems

    Swift Legacy Problems

    Getting the following error. Was wondering if this happens to anybody else too when using xcode 8 and swift 3.

    Is there something that needs to be changed inside of cocoapod file to prevent this from happening? Thanks!

    “Use Legacy Swift Language Version” (SWIFT_VERSION) is required to be configured correctly for targets which use Swift. Use the [Edit > Convert > To Current Swift Syntax…] menu to choose a Swift version or use the Build Settings editor to configure the build setting directly.
    
    opened by rlam3 1
  • Remove pagecontrol when max step is 1

    Remove pagecontrol when max step is 1

    Would be swell to add an option to remove the page control when items being used in the AlertOnboarding is only 1, so this can also be used as an alert.

    opened by gkye 1
  • Alert dark background incorrect size after rotation

    Alert dark background incorrect size after rotation

    When I rotate the device the background doesn't size correctly.

    I made the next changes to fix the issue:

        //Constraints for background
        let widthContraintsForBackground = NSLayoutConstraint(item: self.background, attribute:.Width, relatedBy: .Equal, toItem: nil, attribute: .NotAnAttribute, multiplier: 1, constant: UIScreen.mainScreen().bounds.width)
        let heightConstraintForBackground = NSLayoutConstraint.init(item: self.background, attribute: .Height, relatedBy: .Equal, toItem: nil, attribute: .NotAnAttribute, multiplier: 1, constant: UIScreen.mainScreen().bounds.height)
    

    to

        //Constraints for background
        let widthContraintsForBackground = NSLayoutConstraint(item: self.background, attribute:.Width, relatedBy: .Equal, toItem: superView, attribute: .Width, multiplier: 1, constant: 0)
        let heightConstraintForBackground = NSLayoutConstraint.init(item: self.background, attribute: .Height, relatedBy: .Equal, toItem: superView, attribute: .Height, multiplier: 1, constant: 0)
    
    opened by xradeon 1
  • CocoaPods please!

    CocoaPods please!

    I'd be cool to also add Cocoapods support. I done this implementation myself last week for my library. Just follow this post and this checklist. Lemme know if you need any help! :smile:

    opened by lfarah 1
  • Broken on iOS 12 (center of alert is in bottom-right corner of device)

    Broken on iOS 12 (center of alert is in bottom-right corner of device)

    Thanks Philippe for the pod!

    A quick heads-up, the alert is broken on iOS 12 beta.

    Since I had to manually install the pod anyway to include all the nice PRs that people have pushed, here's how I replaced the constraints to fix the issue (only tested on iPhone X). Won't be pushing a PR because there is already a list of a few ones waiting, plus I am using a UIView convenience extension to create my anchors in a few lines.

    In AlertOnboarding, after removing the constraints (keep those lines), here are the constraints to create:


    • view width anchored to its superview width, multiplier = percentageRatioWidth
    • view height anchored to its superview height, multiplier = percentageRatioHeight
    • view centered in its superview, on X and Y axis

    • buttomButton width anchored to view width, multiplier 1
    • buttomButton height anchored to view height, multiplier 0.1
    • buttomButton's bottom anchored to view bottom
    • buttomButton centered in its superview on X axis

    • container's view width anchored to view width, multiplier 1
    • container's view height anchored to view height, multiplier 0.9
    • container's view top anchored to view top
    • container's view centered in its superview on X axis

    • background fills its superview (pinned to all edges)

    For anyone using LBTAComponents's UIView extension, here's a ready-to-use snippet to replace AlertOnboarding' configureConstraints function:

    fileprivate func configureConstraints(_ superView: UIView) {
        
        removeConstraints(constraints)
        buttonBottom.removeConstraints(buttonBottom.constraints)
        container.view.removeConstraints(container.view.constraints)
        
        equal(width: superView.widthAnchor, widthMultiplier: percentageRatioWidth,
              height: superView.heightAnchor, heightMultiplier: percentageRatioHeight)
        anchorCenterSuperview()
        
        buttonBottom.equal(width: widthAnchor, height: heightAnchor, heightMultiplier: 0.1)
        buttonBottom.anchor(bottom: bottomAnchor)
        buttonBottom.anchorCenterXToSuperview()
        
        //Constraints for container
        container.view.equal(width: widthAnchor, height: heightAnchor, heightMultiplier: 0.9)
        container.view.anchor(top: topAnchor)
        container.view.anchorCenterXToSuperview()
        
        //Constraints for background
        background.fillSuperview()
    }
    
    opened by KevinQuisquater 4
  • Add background fade to the opening and dismissing animation

    Add background fade to the opening and dismissing animation

    When the alertView is dismissed it fades away, then after it fades the background view is removed causing a rather jarring animation as the background suddenly disappears. With this PR the background now fades away along with the alertView for a much smoother transition.

    opened by chickdan 2
Releases(2.0)
Owner
Boisney Philippe
Android Developer 📱🤖
Boisney Philippe
SuggestionsKit is a framework for iOS that was created in order to provide developers with the opportunity to educate users on various features of applications.

SuggestionsKit is a framework for iOS that was created in order to provide developers with the opportunity to educate users

Ilya 63 Nov 30, 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
Create walkthroughs and guided tours (coach marks) in a simple way, with Swift.

Add customizable coach marks into your iOS project. Available for both iPhone and iPad. ⚠️ Instructions 2.0.1 brings a couple of breaking changes, ple

Frédéric Maquin 4.9k Jan 3, 2023
A simple keyframe-based animation framework for UIKit. Perfect for scrolling app intros.

Jazz Hands is a simple keyframe-based animation framework for UIKit. Animations can be controlled via gestures, scroll views, KVO, or ReactiveCocoa. J

IFTTT 6.4k Dec 28, 2022
A simple keyframe-based animation framework for iOS, written in Swift. Perfect for scrolling app intros.

RazzleDazzle is a simple AutoLayout-friendly keyframe animation framework for iOS, written in Swift. Perfect for scrolling app intros. RazzleDazzle gr

IFTTT 3.4k Jan 1, 2023
Swift based simple information view with pointed arrow.

InfoView View to show small text information blocks with arrow pointed to another view.In most cases it will be a button that was pressed. Example To

Anatoliy Voropay 60 Feb 4, 2022
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
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
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
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
Showcase your awesome new app features 📱

WhatsNewKit enables you to easily showcase your awesome new app features. It's designed from the ground up to be fully customized to your needs. Featu

Sven Tiigi 2.8k Jan 3, 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
A super-charged version of MYIntroductionView for building custom app introductions and tutorials.

MYBlurIntroductionView #####NOTICE: As of February 4th, Apple has begun to ban new app submissions using the common blurring method (UIToolbar hack) f

Matthew York 1.5k Dec 23, 2022
Presentation helps you to make tutorials, release notes and animated pages.

Presentation helps you to make tutorials, release notes and animated pages.

HyperRedink 3k Jan 5, 2023
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
Show overlay and info on app components

SwiftyOverlay App Intro / Instruction component to show data over app UI at run time! Easy to use, Animated and Customizable. Supported Components are

Saeid 80 Aug 29, 2022
A simple and attractive AlertView to ask permission to your users for Push Notification.

A simple and attractive AlertView **to ask permission to your users for Push Notification.** PRESENTATION Ask permission to user for push notification

Boisney Philippe 37 Mar 23, 2022
Pendo captures product usage data, gathers user feedback, and lets you communicate in-app to onboard, educate, and guide users to value

Pendo SDK for IOS The Pendo Mobile SDK is a code-less, retro-active analytics collector across all of your app's versions. The SDK also allows present

Pendo 30 Jan 4, 2023
AlertView A pop-up framework, Can be simple and convenient to join your project.

RAlertView AlertView A pop-up framework, Can be simple and convenient to join your project. Warning content Installation Depend on the project Masonry

杜耀辉 71 Aug 12, 2022
Simple Alert View written in Swift, which can be used as a UIAlertController. (AlertController/AlertView/ActionSheet)

DOAlertController Simple Alert View written in Swift, which can be used as a UIAlertController replacement. It supports from iOS7! It is simple and ea

Daiki Okumura 406 Sep 5, 2022