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

自品牌

自品牌

[美] 丹·斯柯伯尔(Dan Schawbel) / 佘卓桓 / 湖南文艺出版社 / 2016-1-1 / 39.80元

什么是自品牌?如何利用新媒体推广自己?如何放大自己的职业优势? 细化到如何巩固“弱联系”人脉?如何在团队里合作与生存?如何开创自己的事业?这些都是职场人不得不面临的问题,但少有人告诉你答案,你需要利用书里分享的高效方法独辟蹊径,把自己变成职场里高性价比的人才。这是一本教你利用新型社交媒体开发职业潜能的自我管理读本,不管你是新人还是老鸟,都可以通过打造自品牌在职场中脱颖而出。如果不甘平庸,就亮......一起来看看 《自品牌》 这本书的介绍吧!

随机密码生成器
随机密码生成器

多种字符组合密码

RGB HSV 转换
RGB HSV 转换

RGB HSV 互转工具

HEX HSV 转换工具
HEX HSV 转换工具

HEX HSV 互换工具