LinPopView 1.0.4

LinPopView 1.0.4

Maintained by lin.



  • By
  • StudentLinn

LinPop

This is a easy popView.这是一个简单的弹窗

代码侵入低

使用方法

拉取文件后初始化一个PopConfig类型的对象,在里面更改全局设置然后调用PopManager.share.config(result:)传入该对象 也可以在PopManager.share.config中修改,会在加载弹窗之前调用设置

//MARK: 方法一定义一个
//定义一个新的配置文件
var config = PopConfig()
//加载图片设置
config.loadingImage = UIImage(named: "PopLoading")
//失败图片设置
config.errorImage = UIImage(named: "PopError")
//成功图片设置
config.successImage = UIImage(named: "PopSuccess")
//传入设置
PopManager.share.config(result: config)
//MARK: 方法二
//全局设置报错图片
PopManager.share.config.errorImage = UIImage(named: "PopError")

//MARK: 在开始加载后单次设置弹窗的属性(开始加载后可以设置),在每次
PopManager.share.popView.font = .systemFont(ofSize: 30, weight: .regular)

//MARK: 使用
//加载中
PopManager.share.loading(view: view, text: "加载中")
//加载成功(动画2秒移除)
PopManager.share.success(text:)
//加载失败(动画2秒移除)
PopManager.share.error(text:)
//提示信息
PopManager.share.tips(view: <#T##UIView#>, text: <#T##String#>, showMask: <#T##Bool#>)

Parameters:

加在什么View上 提示信息 点击关闭按钮回调(exitBlock:) 加载中仅需调用

PopManager.share.loading(view:, text:)方法

Parameters:

加在什么View上(view:) 提示信息

成功/失败调用

PopManager.share.success(text:)
PopManager.share.error(text:)

Parameters:

加在什么View上 提示文字信息 是否需要蒙层 是否展示蒙层 上左下右文字间距

文字提示使用

PopManager.share.tips(view:, text:, mask, showMask:,)并传入对应参数

注:加载中与成功失败弹窗只能出现一个,文字提示tips可以出现无数次