[翻译] 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 ...
随机推荐
- maven tomcat插件上传项目到tomcat服务器报错SEVERE: One or more listeners failed to start.
以前觉了maven依赖设置很简单,就是将手动导入jar包转化为自动下载导入 但发现的一个问题, 在使用maven插件tomcat打包上传工具时 tomcat-maven-plugin <buil ...
- mysql数据库数据监测
#!/bin/bash MYSQL="mysql -h10.10.10.10 -P8036 -uusername -ppassword --default-character-set=utf ...
- 别被官方文档迷惑了!这篇文章帮你详解yarn公平调度
欢迎大家前往腾讯云+社区,获取更多腾讯海量技术实践干货哦~ 本文由@edwinhzhang发表于云+社区专栏 FairScheduler是yarn常用的调度器,但是仅仅参考官方文档,有很多参数和概念文 ...
- 远程通信机制RPC与RMI的关系
1.RPC RPC(Remote Procedure Call Protocol)远程过程调用协议,它是一种通过网络从远程计算机程序上请求服务,而不需要了解底层网络技术的协议.RPC不依赖于具体的网 ...
- 做网站,乱码?应该选用什么编码?GB2312 ? UTF-8 ?
当然了,最常用的编码也就是GB2312 和 UTF-8 了. ================================================起==================== ...
- Linux进程管理四大工具ps \dstat\ top\ htop
Linux进程管理之“四大名捕” 一.四大名捕 四大名捕,最初出现于温瑞安创作的武侠小说,是朝廷中正义力量诸葛小花的四大徒弟,四人各怀绝技,分别是轻功暗器高手“无情”.内功卓越的高手“铁手”.腿功惊人 ...
- .Net4.5新特性:正则表达式超时介绍
“Regex” 在数据验证方面最受欢迎.考虑到您可能对“Regex”完全陌生的.请参考我介绍Regex如何运作的视频. But because of the typical parsing logic ...
- 基础拾遗----RabbitMQ
基础拾遗 基础拾遗------特性详解 基础拾遗------webservice详解 基础拾遗------redis详解 基础拾遗------反射详解 基础拾遗------委托详解 基础拾遗----- ...
- Eclipse下安装SVN插件以及连接SVN服务并发布项目
Eclipse安装SVN插件 Help->Eclipse MarketPlace 查找并安装Subclipse插件 按默认步骤完成SVNEclipse插件的安装(安装完成后需要重启Eclipse ...
- MyEclipse设置当前行背景颜色、选中单词前景色、背景色
General->Editors->Text Editors -> Current Line Hightlight 可以设置当前行的背景颜色 效果如下: