Latest 1.0
Homepage https://github.com/0legAdamov/AOIntroViewController
License MIT
Platforms ios 8.0, requires ARC
Authors

[Language]
(https://developer.apple.com/swift)
[CocoaPods compatible]
(https://cocoapods.org/pods/AOIntroViewController)
[CocoaPods available]
(https://developer.apple.com/swift)

Simple view controller for presenting tutorial screens

Installation

CocoaPods:
pod 'AOIntroViewController'

Usage

Creating IntroPage

You can create some intro pages by let page = AOIntroPageView() and set properties:

Title

  • title
  • titleTopOffset
  • titleHeight
  • titleFont
  • titleColor

Description

  • desc
  • descBottomOffset
  • descHeight
  • descFont
  • descColor

Image

  • iconImage
  • iconHeight
  • iconYOffsetFromCenter

For example:

let page = AOIntroPageView()
page.title = "Page 1 Title"
page.titleTopOffset = 60
page.desc = "description text of page 1nis placed here"
page.descColor = UIColor.whiteColor()
page.iconImage = UIImage(named: "test_image.png")

Creating intro controller

For creating intro controller you can use one of the initialization methods:

  • let intro = AOIntroViewController(withBlurStyle: .Light)
  • let intro = AOIntroViewController(withBlurStyle: .Dark)
  • let intro = AOIntroViewController(withBackgroundColor: UIColor.whiteColor())
  • let intro = AOIntroViewController(withBackgroundImage: UIImage(named: "image.jpg"))
  • let intro = AOIntroViewController(withBlurStyle: .Dark, andImage: UIImage(named: "image.jpg"))

Set pages for controller: intro.pageViews = [page1, page2]

Set property intro.canTapToNext = true (default – true)

Set AOIntroViewControllerDelegate if needed: intro.delegate = self then add

func introViewControllerDidDismiss() {
        print("Intro Controller Did Dismiss")
    }

After that you can show intro controller, for example:

self.navigationController?.presentViewController(intro, animated: false) {
    intro.showAnimated()
}

Latest podspec

{
    "name": "AOIntroViewController",
    "version": "1.0",
    "summary": "Swift library for show simple intro.",
    "homepage": "https://github.com/0legAdamov/AOIntroViewController",
    "authors": {
        "Digital Expansion": "[email protected]"
    },
    "source": {
        "git": "https://github.com/0legAdamov/AOIntroViewController.git",
        "tag": "v1.0"
    },
    "source_files": "Source/*.swift",
    "requires_arc": true,
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "platforms": {
        "ios": "8.0"
    }
}

Pin It on Pinterest

Share This