ZZCustomAlertView 介绍
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,并可以设置阴影的颜色、透明度、是否模糊背景、是否允许点击背景隐藏弹窗等参数。
ZZCustomAlertView *alert = [ZZCustomAlertView alertViewWithParentView:self.view andContentView:nil]; [alert show];
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
ZZCustomAlertView 官网
https://github.com/zzdjk6/ZZCustomAlertView
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 [email protected] 举报,一经查实,本站将立刻删除。