SwiftGuideView 0.8.1

SwiftGuideView 0.8.1

jackiehu 维护。



 
依赖关系
SwiftPageView>= 0
SnapKit>= 0
 

  • jackiehu

SwiftGuideView

Version SPM Xcode 11.0+ iOS 11.0+ Swift 5.0+

基于 SwiftPageView 的启动引导页。在相应的页面调用静态方法并配置适配器即可。

            SwiftGuideView.showGuide(pageArray: ["1","2","3","4","5"], fromVC: self) { (c) in
                c.openButtonTitle = "进入APP"
                c.isDebug = true
            }

API

    /// 启动引导
    /// - Parameters:
    ///   - pageArray: 图片名称数组
    ///   - fromVC: 从哪个页面启动
    ///   - deploy: 配置器
    public static func showGuide(pageArray : [String], fromVC : UIViewController, deploy : ConfigBlock)

适配器

public class GuideConfig {
    ///是否每次都展示
    public var isDebug : Bool = false
    /// 按钮标题
    public var openButtonTitle : String?
    /// 按钮字体颜色
    public var openButtonFont : UIFont = .systemFont(ofSize: 17)
    /// 按钮标题颜色
    public var openButtonTitleColor : UIColor = .white
    /// 按钮宽高
    public var openButtonSize : CGSize = .init(width: 190, height: 50)
    /// 按钮圆角
    public var openButtonRadius : CGFloat = 25
    /// 按钮背景色
    public var openButtonColor : UIColor = .orange
    /// 按钮 距离底部
    public var openButtonOffSetY : CGFloat = 50
    
    /// pageControl 未选中颜色
    public var pageControlInactiveColor = UIColor.white
    /// pageControl 选中颜色
    public var pageControlActiveColor = UIColor.red
    /// pageControl 距离底部
    public var pageControlOffSetY : CGFloat = 50
    
}

安装

cocoapods

1. 在 Podfile 中添加 pod ‘SwiftGuideView’

2. 执行 pod install 或 pod update

3. 导入 import SwiftGuideView

Swift 包管理器

从 Xcode 11 开始,集成了 Swift 包管理器,使用起来非常方便。SwiftGuideView 也支持通过 Swift 包管理器集成。

在 Xcode 的菜单栏中选择 文件 > Swift 包 > 添加包依赖项,然后在搜索栏输入

https://github.com/jackiehu/SwiftGuideView,即可完成集成

手动集成

SwiftGuideView 也支持手动集成,只需将 Sources 文件夹中的 SwiftGuideView 文件夹拖到需要集成的项目中即可

更多砖块工具加速APP开发

ReadMe Card

ReadMe Card

ReadMe Card

ReadMe Card

ReadMe Card

ReadMe Card

ReadMe Card

ReadMe Card

ReadMe Card

ReadMe Card

ReadMe Card

ReadMe Card