lya

LYAlertViewDemo

Swift 一款高封装高拓展性的弹框

Showing:

Popularity

Downloads/wk

0

GitHub Stars

44

Maintenance

Last Commit

8mos ago

Contributors

0

Package

Dependencies

0

License

MIT

Categories

Readme

1.安装

方式一:使用CocoaPods

pod 'LYAlertView'

方式二:手动导入

  • LYAlertView文件夹中的所有源代码拽入项目中
  • 直接调用

2.调用示例

            let item1 = LYAlertFactory()
                .creatAlertShowItem(.title, "温馨提示")
                .fontSize(17)
                .titleColor(UIColor.darkGray)
            let item2 = LYAlertFactory()
                .creatAlertShowItem(.content, "是否确认向老师发起一对一错题辅导请求?")
                .fontSize(16)
                .titleColor(UIColor.darkGray)
                .line(UIColor.lightGray, 0.5)
            let item3 = LYAlertFactory()
                .creatAlertInteractiveItem("我再想想")
                .fontSize(15)
                .btnHeight(30)
                .btnMarin(10)
                .titleColor(UIColor.gray)
                .line(UIColor.lightGray, 0.5, .left)
                .action {
                     print("我再想想")
                }
            let item4 = LYAlertFactory()
                .creatAlertInteractiveItem("确认发起")
                .fontSize(15)
                .btnHeight(30)
                .btnMarin(10)
                .titleColor(UIColor.brown)
                .line(UIColor.lightGray, 0.5, .left)
                .action {
                    print("确认发起")
                }
 let alert = LYAlertBuilder.init(item1, item2, [item3,item4])
                .cornerRadius(15)
                .maskAlpha(0.6)
                .showAnimation(.shakeFromTop, 0.5)
                .hideAnimation(.shakeToTop, 0.5)
                .build()
  alert?.show()

3.效果展示

1 2 3 4

Rate & Review

Great Documentation0
Easy to Use0
Performant0
Highly Customizable0
Bleeding Edge0
Responsive Maintainers0
Poor Documentation0
Hard to Use0
Slow0
Buggy0
Abandoned0
Unwelcoming Community0
100