TestsTested | ✗ |
LangLanguage | SwiftSwift |
License | MIT |
ReleasedLast Release | Nov 2017 |
SwiftSwift Version | 4.0 |
SPMSupports SPM | ✗ |
Maintained by Kyle Sun.
import KSGuideController
var items = [KSGuideItem]()
for button in buttons {
let n = Int(arc4random()) % string.characters.count
let index = string.index(string.startIndex, offsetBy: Int(n))
let text = string.substring(to: index)
let item = KSGuideItem(sourceView: button, text: 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")
}
This library requires iOS 8.0+
and Xcode 8.0+
.
KSGuideController is provided under the MIT license. See LICENSE file for details.