登录 立即注册
金钱:

Code4App-iOS开发-iOS 开源代码库-iOS代码实例搜索-iOS特效示例-iOS代码例子下载-Code4App.com

一个可高度自定义的alertController

[复制链接]
来自: Scott_Li 分类: iOS精品源码 上传时间: 2016-12-6 13:41:51

项目介绍:

ScottAlertView

can display on controller and window,support custom view, custom animation, use AutoLayout,support iPhone,iPad.

Down load

click me down load source code

Requirements

  • Xcode 5 +

  • iOS 7.0 +

  • ARC

How to use

  • show in controller

    ScottAlertView *alertView = [ScottAlertView alertViewWithTitle:@"ScottAlertView" message:@"这是一段描述文字这是一段描述文字这是一段描述文字这是一段描述文字这是一段描述文字这是一段描述文字."];
    
    [alertView addAction:[ScottAlertAction actionWithTitle:@"取消" style:ScottAlertActionStyleCancel handler:^(ScottAlertAction *action) {
        
    }]];
    
    [alertView addAction:[ScottAlertAction actionWithTitle:@"确定" style:ScottAlertActionStyleDestructive handler:^(ScottAlertAction *action) {
        
    }]];
    
    ScottAlertViewController *alertController = [ScottAlertViewController alertControllerWithAlertView:alertView preferredStyle:ScottAlertControllerStyleAlert transitionAnimationStyle:ScottAlertTransitionStyleDropDown];
    alertController.tapBackgroundDismissEnable = YES;
    [self presentViewController:alertController animated:YES completion:nil];
    
  • show in window

    ScottAlertView *alertView = [ScottAlertView alertViewWithTitle:@"提示" message:@"这是一个显示在窗口的alertView"];
    ScottAlertAction *action = [ScottAlertAction actionWithTitle:@"好的" style:ScottAlertActionStyleDestructive handler:nil];
    [alertView addAction:action];
    
    [ScottShowAlertView showAlertViewWithView:alertView backgroundDismissEnable:YES];
  • show with blur effect

    UIImage *img = [UIImage scott_screenShot];
    img = [UIImage scott_blurImage:img blur:0.4];
    
    ScottAlertView *alertView = [ScottAlertView alertViewWithTitle:@"ScottAlertView" message:@"这是一段描述文字这是一段描述文字这是一段描述文字这是一段描述文字这是一段描述文字这是一段描述文字."];
    
    [alertView addAction:[ScottAlertAction actionWithTitle:@"取消" style:ScottAlertActionStyleCancel handler:^(ScottAlertAction *action) {
        
    }]];
    
    [alertView addAction:[ScottAlertAction actionWithTitle:@"确定" style:ScottAlertActionStyleDestructive handler:^(ScottAlertAction *action) {
        
    }]];
    
    ScottAlertViewController *alertController = [ScottAlertViewController alertControllerWithAlertView:alertView preferredStyle:ScottAlertControllerStyleAlert transitionAnimationStyle:ScottAlertTransitionStyleFade];
    
    UIImageView *imgView = [[UIImageView alloc] initWithImage:img];
    imgView.userInteractionEnabled = YES;
    alertController.backgroundView = imgView;
    
    alertController.tapBackgroundDismissEnable = YES;
    [self presentViewController:alertController animated:YES completion:nil];

Contact

  • if you found a bug, open an issue

  • if you need help, open an issue

  • if you have a new demand, also open an issue

code4app

相关源码推荐:

我来说两句
*滑动验证:
所有评论(272)
Scott_Li 2016-12-6 13:46:13
很给力,Code4App有你更精彩!
回复
kengsir 2016-12-6 14:00:10
mark,收藏了
回复
phoiu 2016-12-6 14:01:05
支持,感谢,祝code4app越来越好~
回复
AlonMessi 2016-12-6 14:02:57
相当不错,感谢无私分享精神!
回复
hellokenken 2016-12-6 14:04:26
小弟学习了~支持,支持
回复
littleRed 2016-12-6 14:06:39
好好 学习了 确实不错
回复
code4app热心网友 2016-12-6 15:43:15
虽不明,但觉厉!
回复
code4app热心网友 2016-12-6 16:04:47
虽不明,但觉厉!
回复
dajiangbao 2016-12-6 16:55:35
感谢分享,Code4App有你更精彩:)
回复
提取码:  下载次数:289 状态:已购或VIP 售价:0(原价:10)金钱 下载权限:初级码农 
3402 1 289
联系我们
首页/微信公众账号投稿

帖子代码编辑/版权问题

QQ:435399051,742864542

如何获得代码达人称号?

代码贡献英雄榜
用户名 下载数
通过邮件订阅最新 Code4App 信息
上一条 /4 下一条
联系我们
关闭
合作电话:
13802416937
Email:
435399051@qq.com
商务市场合作/投稿
问题反馈及帮助
联系我们

广告投放| 广东互联网违法和不良信息举报中心|中国互联网举报中心|Github|申请友链|手机版|Code4App ( 粤ICP备15117877号-1 )

快速回复 返回顶部 返回列表
博聚网