项目
在 GitHub 查看
skx926/KSGuideController
关于
A beautiful animated novice guide controller written in Swift. 一个漂亮的新手引导库。
学习与教育可以做什么
- Animated page transition.
- A batch of properties for customization.
实测星标增长
- 24小时
- 0
- 7天
- 0
- 15天
- 0
- 1个月
- 正在收集历史
各周期内的星标净变化,周期相互重叠,并非每日新增。缺失的测量保持空白。星标代表关注度,不代表软件质量。
README.md
原文KSGuideController
A beautiful animated novice guide controller written in Swift.

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
- Update cocoapods to the latest version.
- Add
pod 'KSGuideController'to your Podfile. - Run
pod installorpod update. - Import
KSGuideControllermodule.
Requirements
This library requires iOS 8.0+ and Xcode 8.0+.
License
KSGuideController is provided under the MIT license. See LICENSE file for details.
探索相关项目
加载中…