SwiftGuideView 0.8.1

SwiftGuideView 0.8.1

Maintained by jackiehu.



 
Depends on:
SwiftPageView>= 0
SnapKit>= 0
 

  • By
  • 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 Package Manager

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

在 Xcode 的菜单栏中选择 File > Swift Packages > Add Pacakage Dependency,然后在搜索栏输入

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