iOS 模态弹窗 ZZCustomAlertView

码农软件 · 软件分类 · 弹出视图(Popup View) · 2019-06-30 17:27:16

软件介绍

ZZCustomAlertView 是一个可以高度自定义的 iOS 模态弹窗 (modal alert view)。

项目地址:https://github.com/zzdjk6/ZZCustomAlertView

Github 项目里包含一个 Example 的 Demo 示例。

使用 Cocoapod:

pod "ZZCustomAlertView"

这里是 Demo 效果视频:http://v.youku.com/v_show/id_XMTI3NDQyODk3Mg==.html

简明用法

总的来说,你可以将完全自定义的一个 View 作为 ZZCustomAlertView 的 contentView,并可以设置阴影的颜色、透明度、是否模糊背景、是否允许点击背景隐藏弹窗等参数。

如下代码将创建在 Demo 中看到的默认弹窗。

ZZCustomAlertView *alert = [ZZCustomAlertView alertViewWithParentView:self.view andContentView:nil];
[alert show];

如下代码将创建在 Demo 中看到的自定义弹窗。

UIImage *img = [UIImage imageNamed:@"Perfect Button"];UIButton *btn = [UIButton buttonWithType:UIButtonTypeCustom];
btn.frame = CGRectMake(0, 0, img.size.width, img.size.height);
[btn setImage:img forState:UIControlStateNormal];
[btn addTarget:self action:@selector(customButtonPressed) forControlEvents:UIControlEventTouchUpInside];

ZZCustomAlertView *alert = [ZZCustomAlertView alertViewWithParentView:self.view andContentView:btn];
alert.shouldBlurBackground = YES;
alert.allowTapBackgroundToDismiss = NO;
alert.shadowColor = [UIColor whiteColor];
alert.shadowAlpha = 0.1f;
[alert show];

更多详情请访问 Github 项目地址:https://github.com/zzdjk6/ZZCustomAlertView

本文地址:https://codercto.com/soft/d/9122.html

七周七并发模型

七周七并发模型

Paul Butcher / 黄炎 / 人民邮电出版社 / 2015-3 / 49.00元

借助Java、Go等多种语言的特长,深度剖析所有主流并发编程模型 基于锁和线程的并发模型是目前最常用的一种并发模型,但是并发编程模型不仅仅只有这一种,本书几乎涵盖了目前所有的并发编程模型。了解和熟悉各种并发编程模型,在解决并发问题时会有更多思路。 ——方腾飞,并发编程网站长 当看到这本书的目录时,我就为之一振。它涉及了当今所有的主流并发编程模型(当然也包括Go语言及其实现的CSP......一起来看看 《七周七并发模型》 这本书的介绍吧!

图片转BASE64编码
图片转BASE64编码

在线图片转Base64编码工具

MD5 加密
MD5 加密

MD5 加密工具

XML、JSON 在线转换
XML、JSON 在线转换

在线XML、JSON转换工具