WMZDialog
功能最多样式最多的弹窗,支持普通/底部/日期/地区/日历/选择/编辑/分享/菜单/自定义弹窗等,支持多种动画,链式编程调用(Pop-up windows with the most functions and styles, support normal/bottom/date/region/calendar/select/edit/share/menu/custom pop-up windows, etc., support multiple animations, chain programming calls)
Install / Use
/learn @wwmz/WMZDialogREADME
WMZDailog - 功能最多样式最多的弹窗,支持普通/微信底部/提示/加载框/日期/地区/日历/选择/编辑/分享/菜单/吐司/自定义弹窗等,支持多种动画,链式编程调用,所有属性均可定制
特性
- 链式语法 结构优雅
- 支持任意位置视图的弹窗(包括滚动视图)
- 支持单选/多选
- 支持地区1/2/3级联动(自定义地区数据)
- 支持无限级联动
- 支持加载框
- 支持提示框
- 支持横竖屏
- 支持时间选择(年月日时分秒自由组合+最大最小时间限制)
- 支持支持多种动画
- 支持所有字体颜色/字体大小的设置
- 支持支付视图
- 支持ios13Persent弹窗
- 支持日历
- 支持菜单选择
- 支持默认选中
- 支持所有列表cell样式的自定义
- 支持自定义弹窗
- 支持多弹窗优先级
- 支持自定义深色模式
调用枚举说明
typedef enum : NSUInteger{
DialogTypeNornal = 1, //默认弹窗
DialogTypeSheet, //底部弹窗
DialogTypeAuto, //默认弹窗自动消失
DialogTypePay, //支付密码框
DialogTypeShare, //带分享的弹窗
DialogTypeWrite, //带编辑框的弹窗
DialogTypeSelect, //带选择的弹窗
DialogTypePickSelect, //拾取器弹窗
DialogTypeTime, //带倒计时的弹窗
DialogTypePop, //下拉列表选择弹窗
DialogTypeDown, //带下载的弹窗
DialogTypeMenusSelect, //下拉无限级菜单弹窗
DialogTypeAdvertisement, //广告弹窗
DialogTypeLocation, //地区选择
DialogTypeDatePicker, //日期选择
DialogTypeTabbarMenu, //闲鱼 微博+号底部弹窗
DialogTypeNaviMenu, //QQ顶部弹窗
DialogTypeLoading, //加载框
DialogTypeCardPresent , //ios13 present效果
DialogTypeCalander, //日历弹窗
DialogTypeToast, //吐司
DialogTypeMyView, //自定义弹窗
}DialogType;
| 弹窗类型 | 图片 |
|-----------------------|-----------------------------------------------------|
| 默认弹窗 |
|
| 底部弹窗 |
|
| 自动消失hud弹窗 |
|
| 支付密码框 |
|
| 带分享的弹窗 |
|
| 带编辑框的弹窗 |
|
| 带选择的弹窗 |
|
| 拾取器弹窗 |
|
| 带倒计时的弹窗 |
|
| 下拉列表选择弹窗 |
|
| 带下载的弹窗 |
|
| 下拉无限级菜单弹窗 |
|
| 地区弹窗 |
|
| 日期选择弹窗 |
|
| 顶部菜单弹窗 |
|
| 底部菜单弹窗 |
|
| 加载框 |
|
| ios13 present效果 |
|
| 日历弹窗 |
|
| 自定义弹窗 |
|
参数说明(详情使用看demo)
DialogTypeNornal/DialogTypeSheet/DialogTypeSelect。。。
| 可配置通用参数 | 类型 | 作用 (默认值) | |------------------------|-----------|-----------------------------------------------------| | wData | id | 数据源 | | wShowAnimation | DialogShowAnination | 出现的动画 default AninatonZoomIn | | wHideAnimation | DialogHideAnination| 消失的动画 default none | | wAnimationDurtion | NSTimeInterval | 动画时间 default 0.8 | | wParentVC | UIViewController | 父控制器 default 当前VC | | wType | DialogType | 弹窗类型 default DialogTypeNornal | | wWidth | CGFloat | 弹窗视图的宽度 default 500 | | wHeight | CGFloat | 弹窗视图的高度 default 自适应高度 300 | | wMainOffsetY | CGFloat | Y间距 default 20 | | wMainOffsetX | CGFloat | X间距 default 15 | | wMainBtnHeight | CGFloat | 按钮高度 default 60 | | wMyCell | UITableViewCell | 自定义cell | | wMainToBottom | BOOL | 视图在最底部 default NO | | wLineColor | UIColor | 线条的颜色 default 333333 | | wLineAlpha | CGFLoat | 线条的透明度 default 0.5 | | wTitle | NSString | 标题文本 default 标题 | | wMessage | NSString | 内容文本 default 内容 | | wOKTitle | NSString | 确定按钮的文本 default 确定 | | wCancelTitle | NSString | 取消按钮的文本 default 取消 | | wOKColor | UIColor | 确定按钮的颜色 default 0xFF9900 | | wCancelColor | UIColor | 取消按钮的颜色 default 0x666666 | | wMainBackColor | UIColor | 弹出视图的背景颜色 default 0xffffff | | wTitleColor | UIColor | 标题文本的颜色 default 0x333333 | | wMessageColor | UIColor | 内容文本的颜色 default 0x333333 | | wOKFont | CGFLoat | 确定按钮的字体大小 default 16.0f | | wCancelFont | CGFLoat | 取消按钮的字体大小 default 16.0f | | wTitleFont | CGFLoat | 标题文本的字体大小 default 14.0f | | wMessageFont | CGFLoat | 内容文本的字体大小 default 16.0f | | wMainRadius | CGFLoat |弹出视图的圆角 default 15.0f | | wShadowColor | UIColor | 遮罩层的颜色 default 0x333333 | | wShadowAlpha | CGFLoat | 遮罩层的透明度 default 0.4f | | wShadowCanTap | BOOL | 遮罩层能否点击关闭 default YES | | wShadowShow | BOOL | 遮罩层是否显示 default YES | | wEffectShow | BOOL |毛玻璃是否显示 default NO | | wMultipleSelection | BOOL | 多选 default NO | | wSelectShowChecked | BOOL |选中是否打钩 default NO | | wTextAlignment | NSTextAlignment| 文本对齐方式 default center |
DialogTypeAuto
| DialogTypeAuto参数 | 类型 | 作用 (默认值) | |------------------------|-----------|-----------------------------------------------------| | wDisappelSecond | CGFLoat | 自动消失的时间 default 1.5f |
DialogTypePay
| DialogTypePay参数 | 类型 | 作用 (默认值) | |------------------------|-----------|-----------------------------------------------------| | wSonData | id | 支付方式选择数据源 | | wKeyBoardMarginY | CGFLoat | 弹窗与键盘的距离 default 70 | | wPayNum | NSInteger | 支付密码位数 default 6(若要设置位数比6大的则要保证宽度足够) | | wDefaultSelectPayStr | NSString | 支付方式默认文本 default 农业银行 |
DialogTypeWrite
| DialogTypeWrite参数 | 类型 | 作用 (默认值) | |------------------------|-----------|-----------------------------------------------------| | wPlaceholder | NSString | 提示语 default 请输入 | | wWirteTextMaxLine | NSInteger | 编辑框可换行的最大行数 default 7 | | wWirteTextMaxNum | N
