- Support for custom area focus.
- Support for custom view focus.
- Support for custom mask graphic focus.
- Support single-page multi-focus display.
- Support multiple prompts for each focus.
CocoaPods - Podfile
source 'https://github.com/lixiang1994/Specs'
pod 'Guider'
Carthage - Cartfile
github "lixiang1994/Guider"
First make sure to import the framework:
import Guider
Here are some usage examples. All devices are also available as simulators:
Each page contains multiple items, each containing a focus and multiple prompts.
var item = Guider.PageItem(.view(cell))
item = item.set(focus: {
// focus click action
})
item = item.set(prompt: { (index) in
// prompts click action
})
// add prompt
item = item.add(prompt: .image(image, .top(0.0)))
Guider.Page(items: [item]) {
// page click action
}
// The default guide page will be added to the current keyWindow
Guider.Provider.start([page]) {
// Guided completion
}
Guider.Provider.next()
Guider.Provider.stop()
enum Focus {
// UIView
case view(UIView)
case viewInsets(UIView, UIEdgeInsets)
case viewInsetsCorner(UIView, UIEdgeInsets, cornerRadius: CGFloat)
case viewInsetsMask(UIView, UIEdgeInsets, UIImage)
// CGRect
case rect(CGRect)
case ellipse(CGRect)
case mask(CGRect, UIImage)
case rounded(CGRect, cornerRadius: CGFloat)
case roundedCorners(CGRect, roundingCorners: UIRectCorner, cornerRadii: CGSize)
case cirque(center: CGPoint, radius: CGFloat, startAngle: CGFloat, endAngle: CGFloat, clockwise: Bool)
}
enum Prompt {
case image(UIImage, Position)
case view(UIView, Position)
}
If you have the need for a specific feature that you want implemented or if you experienced a bug, please open an issue. If you extended the functionality of Guider yourself and want others to use it too, please submit a pull request.
Guider is under MIT license. See the LICENSE file for more info.