Skip to content
프로젝트

skx926/KSGuideController

GitHub에서 보기

소개

A beautiful animated novice guide controller written in Swift. 一个漂亮的新手引导库。

학습 및 교육

이 수치를 측정하는 방법

What you can do

  • Animated page transition.
  • A batch of properties for customization.

측정된 스타 증가

in 24h
0
in 7 days
0
in 15 days
0
in 1 month
기록 수집 중

서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.

README.md

Original

KSGuideController

License MIT  CocoaPods  CocoaPods  Support 

A beautiful animated novice guide controller written in Swift.

Demo~

Features

  • Animated page transition.
  • A batch of properties for customization.
  • Cache support.

Usage

Swift

import KSGuideController

var items = [KSGuideItem]()
for button in buttons {
    let n = Int(arc4random()) % string.count
    let index = string.index(string.startIndex, offsetBy: Int(n))
    let text = string[..<index]
    if n % 2 == 0 {
        // Use custom arrow image for every item, you can also set global arrow image for all items by setting the arrowImage property for a KSGuideController instance.
        let item = KSGuideItem(sourceView: button, arrowImage: #imageLiteral(resourceName: "arrow"), text: String(text))
        items.append(item)
    } else {
        // Use default arrow image
        let item = KSGuideItem(sourceView: button, text: String(text))
        items.append(item)
    }
}
let vc = KSGuideController(items: items, key: "MainGuide")
vc.setIndexWillChangeBlock { (index, item) in
    print("Index will change to \(index)")
}
vc.setIndexDidChangeBlock { (index, item) in
    print("Index did change to \(index)")
}
vc.show(from: self) { 
    print("Guide controller has been dismissed")
}

Installation

Cocoapods

  1. Update cocoapods to the latest version.
  2. Add pod 'KSGuideController' to your Podfile.
  3. Run pod install or pod update.
  4. Import KSGuideController module.

Requirements

This library requires iOS 8.0+ and Xcode 8.0+.

License

KSGuideController is provided under the MIT license. See LICENSE file for details.

관련 프로젝트 살펴보기

불러오는 중…