[翻译] 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 ...
随机推荐
- docker “no space left on device”问题定位解决
在paas环境上使用docker加载镜像的时候出现了如下问题 第一反应应该是存储镜像的路径磁盘满了 docker info查看docker的根路径,可以看到为/opt/docker: 查看/opt/d ...
- <转载> 58到家数据库设计规范
原文地址: http://mp.weixin.qq.com/s?__biz=MjM5ODYxMDA5OQ==&mid=2651959906&idx=1&sn=2cbdc66cf ...
- 桌面程序开发入门(WinForm with C#)
1.使用Visual Studio 2013创建新项目 2.创建一个主窗体和4个子窗体 3.创建一个数据库.一个表.一个存储过程 4.在配置文件里添加数据库连接字符串 5.真正的编码工作. 第一步:创 ...
- [C++][转]CPU字节序 网络序 主机序 大端小端
原帖:http://www.cnblogs.com/darktime/p/3298075.html 不同的CPU有不同的字节序类型 这些字节序是指整数在内存中保存的顺序 这个叫做主机序最常见的有两种1 ...
- 修改 /etc/pam.d/login, linux 本地账号密码无法登陆,一直返回 登陆的login界面
今天我在我虚拟机测试的时候遇到了一个问题.登陆centos一直是返回login,账号和密码没错,我也换了两个用户. 1.问题描述 我正常的输入用户名和密码 错误提示截图:返回登陆界面,我重新试了另外的 ...
- POJ 1251 Jungle Roads(Kruskal算法求解MST)
题目: The Head Elder of the tropical island of Lagrishan has a problem. A burst of foreign aid money w ...
- 能ping通外网dns但不能上网一例
一个win7本本仅通过一个无线路由一个人上网,突然一天不能上网了,甚是奇怪,一看本地连接均是正常的.而且能ping通外网的dns,但无论如何就是打不开网页,表现为输入任何网址很迅速的显示该页无法显示, ...
- 上传多张图片imgupload
<tr> <td class="listtitle-up">尿素箱</td> <td> <div class="co ...
- ORDER BY 高级用法之CASE WHEN
今天在公司查看一段sql SP代码,发现了一段比较奇怪的代码. 大概长这样子: Select * from tableA ORDER BY ColA , CASE END 小弟才疏学浅,咋一看到代码以 ...
- 使用AutoFac组织多项目应用程序
较复杂的应用程序都是由多个项目组织成的,项目可以划分成程序集(Assemblies)和宿主(Hosts),也就是应用程序的入口. Assemblies 通常是常见的类库项目,包括可以重用的功 ...