Latest 0.1.0
Homepage https://github.com/kaihoko-kenta/KPCRotateWalkthrough
License MIT
Platforms ios 8.0, requires ARC
Authors

language
[![CI Status](http://img.shields.io/travis/Kaihoko Kenta/KPCRotateWalkthrough.svg?style=flat)](https://travis-ci.org/Kaihoko Kenta/KPCRotateWalkthrough)
Version
License
Platform

gifDemo

Usage

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

Requirements

Swift 2.0

Installation

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

pod "KPCRotateWalkthrough"

Get Started

First of all, import this library.

import KPCRotateWalkthrough

prepare two UIView Array, one is fixed view the other is rotated view.

//view which is fixed,such as text.
var fixView: [UIView] = []
//view which rotates, such as Image.
var rotationView: [UIView] = []

let wtv = WalkThroughView(frame: self.view.frame, fixView: fixView, rotationView: rotationView)
self.view.addSubview(wtv)

Example

self.view.backgroundColor = UIColor(red: 1/255, green: 143/255, blue: 100/255, alpha: 1.0)

let dh: CGFloat = self.view.frame.height
let dw: CGFloat = self.view.frame.width

let rotationFrame = CGRectMake(0, dh * 0.1, dw, dh * 0.7)
//rotationView factor
let firstImage = UIImageView(frame: rotationFrame)
firstImage.contentMode = .ScaleAspectFit
firstImage.image = UIImage(named: "first")
let secondImage = UIImageView(frame: rotationFrame)
secondImage.contentMode = .ScaleAspectFit
secondImage.image = UIImage(named: "second")
let thirdImage = UIImageView(frame: rotationFrame)
thirdImage.contentMode = .ScaleAspectFit
thirdImage.image = UIImage(named: "third")
rotationView.append(firstImage)
rotationView.append(secondImage)
rotationView.append(thirdImage)

let fixFrame = CGRectMake(50, dh * 0.8, dw - 100, dh * 0.2)
//fixView factor
let firstText = UILabel(frame: fixFrame)
firstText.text = "The text of first view. nThis text is not rotatable"
firstText.textColor = UIColor.whiteColor()
firstText.numberOfLines = 0
firstText.textAlignment = .Center
let secondText = UILabel(frame: fixFrame)
secondText.text = "The text of second view. nSmooth rotation will contribute to user's high grade UX"
secondText.textColor = UIColor.whiteColor()
secondText.numberOfLines = 0
secondText.textAlignment = .Center
let thirdText = UILabel(frame: fixFrame)
thirdText.text = "The text of third view. nIf you like, please star me. nThis Library was developed for Channel on AppStore"
thirdText.textColor = UIColor.whiteColor()
thirdText.numberOfLines = 0
thirdText.textAlignment = .Center
fixView.append(firstText)
fixView.append(secondText)
fixView.append(thirdText)

//Call WalkThroughView
let wtv = WalkThroughView(frame: self.view.frame, fixView: fixView, rotationView: rotationView)
self.view.addSubview(wtv)

Author

Chotchy,inc CEO(http://chotchy.net)
Kaihoko Kenta
Twitter(http://twitter.com/umipocoken)

License

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

Latest podspec

{
    "name": "KPCRotateWalkthrough",
    "version": "0.1.0",
    "summary": "Rotate Walkthrough.",
    "description": "This can make your walkthrough more Wonderful!!",
    "homepage": "https://github.com/kaihoko-kenta/KPCRotateWalkthrough",
    "license": "MIT",
    "authors": {
        "Kaihoko Kenta": "[email protected]"
    },
    "source": {
        "git": "https://github.com/kaihoko-kenta/KPCRotateWalkthrough.git",
        "tag": "0.1.0"
    },
    "platforms": {
        "ios": "8.0"
    },
    "requires_arc": true,
    "source_files": "Pod/Classes/**/*",
    "resource_bundles": {
        "KPCRotateWalkthrough": [
            "Pod/Assets/*.png"
        ]
    }
}

Pin It on Pinterest

Share This