SIAlertView

https://github.com/Sumi-Interactive/SIAlertView

An UIAlertView replacement with block syntax and fancy transition styles. As seen in Grid Diary.

一个UIAlertView,使用了block的格式,以及很绚的交互动画,你可以看看 Grid Diary .

Features

  • use window to present 加载在window上
  • happy with rotation 你可以进行旋转
  • block syntax block格式
  • styled transitions 风格切换
  • queue support 队列支持
  • UIAppearance support 支持UIAppearance

Installation

Cocoapods(Recommended)

  1. Add pod 'SIAlertView' to your Podfile. 将SIAlertView添加到你的Podfile中
  2. Run pod install 执行install

Manual

  1. Add all files under SIAlertView/SIAlertView to your project 将SIAlertView文件夹中的所有文件添加到你的项目当中
  2. Add QuartzCore.framework to your project 添加QuartzCore.framework到你的项目中

Requirements

  • iOS 5.0 and greater iOS5.0+
  • ARC ARC

(If you are having any problems, just select your project -> Build Phases -> Compile Sources, double-click the SIAlertView and add -fobjc-arc)

如果你是MRC环境,选择project -> Build Phases -> Compile Sources,双击SIAlertView然后加上-fobjc-arc.

Examples

Code:

SIAlertView *alertView = [[SIAlertView alloc] initWithTitle:@"SIAlertView" andMessage:@"Sumi Interactive"];

[alertView addButtonWithTitle:@"Button1"
type:SIAlertViewButtonTypeDefault
handler:^(SIAlertView *alert) {
NSLog(@"Button1 Clicked");
}];
[alertView addButtonWithTitle:@"Button2"
type:SIAlertViewButtonTypeDestructive
handler:^(SIAlertView *alert) {
NSLog(@"Button2 Clicked");
}];
[alertView addButtonWithTitle:@"Button3"
type:SIAlertViewButtonTypeCancel
handler:^(SIAlertView *alert) {
NSLog(@"Button3 Clicked");
}]; alertView.willShowHandler = ^(SIAlertView *alertView) {
NSLog(@"%@, willShowHandler", alertView);
};
alertView.didShowHandler = ^(SIAlertView *alertView) {
NSLog(@"%@, didShowHandler", alertView);
};
alertView.willDismissHandler = ^(SIAlertView *alertView) {
NSLog(@"%@, willDismissHandler", alertView);
};
alertView.didDismissHandler = ^(SIAlertView *alertView) {
NSLog(@"%@, didDismissHandler", alertView);
}; alertView.transitionStyle = SIAlertViewTransitionStyleBounce; [alertView show];

Credits

SIAlertView was created by Sumi Interactive in the development of Grid Diary.

License

SIAlertView is available under the MIT license. See the LICENSE file for more info.

[翻译] SIAlertView的更多相关文章

  1. 《Django By Example》第五章 中文 翻译 (个人学习,渣翻)

    书籍出处:https://www.packtpub.com/web-development/django-example 原作者:Antonio Melé (译者@ucag注:大家好,我是新来的翻译, ...

  2. 《Django By Example》第四章 中文 翻译 (个人学习,渣翻)

    书籍出处:https://www.packtpub.com/web-development/django-example 原作者:Antonio Melé (译者注:祝大家新年快乐,这次带来<D ...

  3. [翻译]开发文档:android Bitmap的高效使用

    内容概述 本文内容来自开发文档"Traning > Displaying Bitmaps Efficiently",包括大尺寸Bitmap的高效加载,图片的异步加载和数据缓存 ...

  4. 【探索】机器指令翻译成 JavaScript

    前言 前些时候研究脚本混淆时,打算先学一些「程序流程」相关的概念.为了不因太枯燥而放弃,决定想一个有趣的案例,可以边探索边学. 于是想了一个话题:尝试将机器指令 1:1 翻译 成 JavaScript ...

  5. 《Django By Example》第三章 中文 翻译 (个人学习,渣翻)

    书籍出处:https://www.packtpub.com/web-development/django-example 原作者:Antonio Melé (译者注:第三章滚烫出炉,大家请不要吐槽文中 ...

  6. 《Django By Example》第二章 中文 翻译 (个人学习,渣翻)

    书籍出处:https://www.packtpub.com/web-development/django-example 原作者:Antonio Melé (译者注:翻译完第一章后,发现翻译第二章的速 ...

  7. 《Django By Example》第一章 中文 翻译 (个人学习,渣翻)

    书籍出处:https://www.packtpub.com/web-development/django-example 原作者:Antonio Melé (译者注:本人目前在杭州某家互联网公司工作, ...

  8. 【翻译】Awesome R资源大全中文版来了,全球最火的R工具包一网打尽,超过300+工具,还在等什么?

    0.前言 虽然很早就知道R被微软收购,也很早知道R在统计分析处理方面很强大,开始一直没有行动过...直到 直到12月初在微软技术大会,看到我软的工程师演示R的使用,我就震惊了,然后最近在网上到处了解和 ...

  9. ASP.NET MVC with Entity Framework and CSS一书翻译系列文章之第一章:创建基本的MVC Web站点

    在这一章中,我们将学习如何使用基架快速搭建和运行一个简单的Microsoft ASP.NET MVC Web站点.在我们马上投入学习和编码之前,我们首先了解一些有关ASP.NET MVC和Entity ...

随机推荐

  1. Linux-(which,whereis,locate,find)

    我们经常在linux要查找某个文件,但不知道放在哪里了,可以使用下面的一些命令来搜索: which  查看可执行文件的位置. whereis 查看文件的位置. locate   配合数据库查看文件位置 ...

  2. 剑指offer66:机器人的活动范围

    地上有一个m行和n列的方格.一个机器人从坐标0,0的格子开始移动,每一次只能向左,右,上,下四个方向移动一格,但是不能进入行坐标和列坐标的数位之和大于k的格子. 例如,当k为18时,机器人能够进入方格 ...

  3. 复刻smartbits的国产网络测试工具minismb-如何测试ip限速

    复刻smartbits的网路性能测试工具MiniSMB,是一款专门用于测试智能路由器,网络交换机的性能和稳定性的软硬件相结合的工具.可以通过此工具测试任何ip网络设备的端口吞吐率,带宽,并发连接数和最 ...

  4. javascript 方法总结(Array篇)

    1.toString:返回以数组种的每个值得字符串形式拼接而成得一个以逗号分割得字符串 toStringArr = [1, 2, 3, 4, 5, 6] console.log(toStringArr ...

  5. 小白学习之Code First(五)

    Fluent API:另一种配置实体类的方式,它比DataAnnorations提供了更多的配置 其中EntityTypeConfiguration这个类提供了重要的属性.方法来配置对应的实体类,可以 ...

  6. linux vi模式下基本命令和快捷键

    移动光标上:k nk:向上移动n行 9999k或gg可以移到第一行 G移到最后一行下:j nj:向下移动n行左:h nh:向左移动n列右:l nl:向右移动n列 w:光标以单词向前移动 nw:光标向前 ...

  7. 机器学习classification_report方法及precision精确率和recall召回率 说明

    classification_report简介 sklearn中的classification_report函数用于显示主要分类指标的文本报告.在报告中显示每个类的精确度,召回率,F1值等信息. 主要 ...

  8. 【JavaScript 从零开始】 原始值和对象引用、类型转换

    JavaScript 中的原始值(undefined.null . 布尔值.数值和字符串)于对象(包括数组和函数)有着根本区别. 原始值是不可更改的:任何方法都无法改变(或“突变”)一个原始值. 对于 ...

  9. spring jpa和mybatis整合

    spring jpa和mybatis整合 前一阵子接手了一个使用SpringBoot 和spring-data-jpa开发的项目 后期新加入一个小伙伴,表示jpa相比mybatis太难用,多表联合的查 ...

  10. java设计模式-----15、适配器模式

    概念: Adapter模式也叫适配器模式,是构造型模式之一,通过Adapter模式可以改变已有类(或外部类)的接口形式. 举个例子:我们使用电脑,家里的电源是220V的,而我们的电脑是18V的,这时如 ...