[翻译] SIAlertView
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)
- Add
pod 'SIAlertView'to your Podfile. 将SIAlertView添加到你的Podfile中 - Run
pod install 执行install
Manual
- Add all files under
SIAlertView/SIAlertViewto your project 将SIAlertView文件夹中的所有文件添加到你的项目当中 - Add
QuartzCore.frameworkto 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的更多相关文章
- 《Django By Example》第五章 中文 翻译 (个人学习,渣翻)
书籍出处:https://www.packtpub.com/web-development/django-example 原作者:Antonio Melé (译者@ucag注:大家好,我是新来的翻译, ...
- 《Django By Example》第四章 中文 翻译 (个人学习,渣翻)
书籍出处:https://www.packtpub.com/web-development/django-example 原作者:Antonio Melé (译者注:祝大家新年快乐,这次带来<D ...
- [翻译]开发文档:android Bitmap的高效使用
内容概述 本文内容来自开发文档"Traning > Displaying Bitmaps Efficiently",包括大尺寸Bitmap的高效加载,图片的异步加载和数据缓存 ...
- 【探索】机器指令翻译成 JavaScript
前言 前些时候研究脚本混淆时,打算先学一些「程序流程」相关的概念.为了不因太枯燥而放弃,决定想一个有趣的案例,可以边探索边学. 于是想了一个话题:尝试将机器指令 1:1 翻译 成 JavaScript ...
- 《Django By Example》第三章 中文 翻译 (个人学习,渣翻)
书籍出处:https://www.packtpub.com/web-development/django-example 原作者:Antonio Melé (译者注:第三章滚烫出炉,大家请不要吐槽文中 ...
- 《Django By Example》第二章 中文 翻译 (个人学习,渣翻)
书籍出处:https://www.packtpub.com/web-development/django-example 原作者:Antonio Melé (译者注:翻译完第一章后,发现翻译第二章的速 ...
- 《Django By Example》第一章 中文 翻译 (个人学习,渣翻)
书籍出处:https://www.packtpub.com/web-development/django-example 原作者:Antonio Melé (译者注:本人目前在杭州某家互联网公司工作, ...
- 【翻译】Awesome R资源大全中文版来了,全球最火的R工具包一网打尽,超过300+工具,还在等什么?
0.前言 虽然很早就知道R被微软收购,也很早知道R在统计分析处理方面很强大,开始一直没有行动过...直到 直到12月初在微软技术大会,看到我软的工程师演示R的使用,我就震惊了,然后最近在网上到处了解和 ...
- ASP.NET MVC with Entity Framework and CSS一书翻译系列文章之第一章:创建基本的MVC Web站点
在这一章中,我们将学习如何使用基架快速搭建和运行一个简单的Microsoft ASP.NET MVC Web站点.在我们马上投入学习和编码之前,我们首先了解一些有关ASP.NET MVC和Entity ...
随机推荐
- 面向UI编程框架:ui.js框架思路详细设计
由于上一次的灵光一闪,萌生了对面向UI编程的思想实现.经过一段时间的考虑和设计,现在将思想和具体细节记录下来: 具体思路描述: 在UI.config文件中,配置所有参数,比如页面模板.所有组件.组件控 ...
- .bat学习-基础语法(常用)
一般来说,脚本或者语言都有相同地方 定义变量,输入,输出,判断条件等等.知道的相同之处,我们就可以借助强大的搜索引擎进行查找我们想要知道的东西. bat为批处理脚本BATCH.现在只知道是使用于win ...
- Linux 文件内容查看工具介绍-cat,less,more,tail,head
Linux 文件内容查看工具介绍 作者:北南南北来自:LinuxSir.Org摘要: 本文讲述几种常用文件内容的查看工具,比如cat.more.less.head.tail等,把这些工具最常用的参数. ...
- C#语法之Linq查询基础二
上篇C#语法之Linq查询基础一基本把Linq介绍了一下,这篇主要是列举下它的几个常见用法. 在用之前先准备些数据,新建了两个类Student.Score,并通过静态方法提供数据. using Sys ...
- Resources in Visual Tracking
这个应该是目前最全的Tracking相关的文章了 一.Surveyand benchmark: 1. PAMI2014:VisualTracking_ An Experimental Sur ...
- .net core 2.2 部署CentOS7(5)部署.net core mvc
目录: .net core 2.2 部署CentOS7(1)安装虚拟机 .net core 2.2 部署CentOS7(2)给虚拟机安装CentOS7 .net core 2.2 部署CentOS7( ...
- C#动态创建lambda表达式
/// <summary> /// 创建lambda表达式:p=>true /// </summary> /// <typeparam name="T&q ...
- grafana 安装- 曲线图展示每秒新增数据量
下载: https://dl.grafana.com/oss/release/grafana-5.4.2.windows-amd64.zip 解压就能用 添加数据源 添加查询条件 sql 模式编写查询 ...
- 第二十四天- 模块导入 import from xxx import xxx
# 模块:# 模块就是⼀个包含了python定义和声明的⽂件,⽂件名就是模块的名字加上.py后缀# 换句话说我们⽬前写的所有的py⽂件都可以看成是⼀个模块# 为何用模块:写大项目时,把相关的功能进⾏分 ...
- HackerRank Special Substrings 回文树+后缀自动机+set
传送门 既然要求对每个前缀都求出答案,不难想到应该用回文树求出所有本质不同的回文子串. 然后考虑如何对这些回文子串的前缀进行去重. 结论:答案等于所有本质不同的回文子串长之和减去字典序相邻的回文子串的 ...