Latest 1.0.8
Homepage https://github.com/P1xelfehler/IntroScreen
License MIT
Platforms ios 11.0
Authors

Version
License
Platform

A beautiful intro screen for iOS written in Swift.

IntroScreen

How to use:

  1. Add a ViewController to your storyboard & set IntroViewController as the class.

  2. Add a segue to this ViewController

  3. Set the introDataSource to the IntroViewController in prepareForSegue()

  4. Configure the ViewController in your data source like this:
var numberOfPages: Int {
  return 3
}

// Return true, if you want to fade out the last page color into black.
var fadeOutLastPage: Bool {
  return false
}

func viewController(at index: Int) -> IntroPageViewController? {
  switch index {
    case 0:
      return DefaultIntroPageViewController.getInstance(
            index: index,
                hue: 30/360,
                title: "First page",
                subtitle: "This is the first page.",
                image: UIImage(named: "first")
            )
    case 1:
      return DefaultIntroPageViewController.getInstance(
                index: index,
                hue: 60/360,
                title: "Second page",
                subtitle: "This is the second page.",
                image: UIImage(named: "second")
            )
    case 2:
      return DefaultIntroPageViewController.getInstance(
                index: index,
                hue: 90/360,
                title: "Third page",
                subtitle: "This is the third page.",
                image: UIImage(named: "third")
            )
    default:
      return nil
  }
}

Customization

Of course you can also use a custom view controller for the pages. Just extend IntroPageViewController. But you have to give it a clear background, so that the colors are visible.

The colors use the HSV color model. So, you just provide the hue in your Intro Pages.
You can change the saturation & brightness in the IntroViewController for all pages at the same time:

introViewController.saturation = 0.85
introViewController.brightness = 0.9

If you want to navigate the pages programmatically (for example if you want to add buttons for this), you can use these methods:

introViewController.nextPage() // navigate forward
introViewController.previousPage() // navigate back

Example

To run the example project, clone the repo, and run pod install from the Example directory first.

Installation

IntroScreen is available through CocoaPods. To install
it, simply add the following line to your Podfile:

pod 'IntroScreen'

Author

P1xelfehler, [email protected]

License

IntroScreen is available under the MIT license. See the LICENSE file for more info.

Latest podspec

{
    "name": "IntroScreen",
    "version": "1.0.8",
    "summary": "A beautiful intro screen for iOS written in Swift.",
    "description": "This pod is an Intro Screen for iOS for discribing beautifully what the app you are building does. It uses color shifting between each intro page and is highly customizable. You can use the default intro page with image, title & subtitle or can use your own intro page.",
    "homepage": "https://github.com/P1xelfehler/IntroScreen",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "P1xelfehler": "[email protected]"
    },
    "source": {
        "git": "https://github.com/P1xelfehler/IntroScreen.git",
        "tag": "1.0.8"
    },
    "platforms": {
        "ios": "11.0"
    },
    "swift_versions": "5.0",
    "source_files": "IntroScreen/Classes/**/*"
}

Pin It on Pinterest

Share This