UI6_UIAlertContrller
//
// ViewController.m
// UI6_UIAlertContrller
//
// Created by zhangxueming on 15/7/7.
// Copyright (c) 2015年 zhangxueming. All rights reserved.
// #import "ViewController.h" @interface ViewController () @end @implementation ViewController - (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event
{
//NSLog(@"屏幕被触摸");
// UIAlertController *alertController = [UIAlertController alertControllerWithTitle:@"提示" message:@"电量不足%10" preferredStyle:UIAlertControllerStyleAlert];
//
// [alertController addAction:[UIAlertAction actionWithTitle:@"取消" style:UIAlertActionStyleCancel handler:^(UIAlertAction *action) {
// NSLog(@"取消");
// }]];
//
// [alertController addAction:[UIAlertAction actionWithTitle:@"确定" style:UIAlertActionStyleDefault handler:^(UIAlertAction *action) {
// NSLog(@"确定");
// }]];
//
// [self presentViewController:alertController animated:YES completion:nil]; UIAlertController *actionSheet = [UIAlertController alertControllerWithTitle:@"分享" message:@"分享" preferredStyle:UIAlertControllerStyleActionSheet];
[actionSheet addAction:[UIAlertAction actionWithTitle:@"取消" style:UIAlertActionStyleCancel handler:nil]];
[actionSheet addAction:[UIAlertAction actionWithTitle:@"新浪微博" style:UIAlertActionStyleDefault handler:nil]];
[actionSheet addAction:[UIAlertAction actionWithTitle:@"QQ" style:UIAlertActionStyleDestructive handler:nil]]; [self presentViewController:actionSheet animated:YES completion:nil];
} - (void)viewDidLoad {
[super viewDidLoad];
// Do any additional setup after loading the view, typically from a nib. } - (void)didReceiveMemoryWarning {
[super didReceiveMemoryWarning];
// Dispose of any resources that can be recreated.
} @end
UI6_UIAlertContrller的更多相关文章
随机推荐
- smartPtr指针的实现
编写一个智能指针类.智能指针是一种数据类型,一般用模板实现,模拟指针行为的同时还提供自动来及回收机制.它会自动记录SmartPointer<T*>对象的引用计数,一旦T类型对象的引用计数为 ...
- ZOJ 2588 Burning Bridges(求含重边的无向连通图的割边) - from lanshui_Yang
Burning Bridges Time Limit: 5 Seconds Memory Limit: 32768 KB Ferry Kingdom is a nice little country ...
- C/C++的参数传递机制
近来公司招人较多,由此面试了非常多的C++程序员.面试时,我都会问到参数传递的相关问题,尤其侧重指针.因为指针毕竟是C/C++最重要的一个优势(在某种情况下也可以说是劣势).但其结果是,1/3的人基本 ...
- 小白日记49:kali渗透测试之Web渗透-XSS(三)-存储型XSS、DOM型XSS、神器BEFF
存储型XSS与DOM型XSS [XSS原理] 存储型XSS 1.可长期存储于服务器端 2.每次用户访问都会被执行js脚本,攻击者只需侦听指定端口 #攻击利用方法大体等于反射型xss利用 ##多出现在留 ...
- 翻译:WebApi 认证--用户认证Oauth解析
The Web API v2用户认证模板提供了流行的应用用户认证场景,如.使用本地帐号的用户名密码认账 (包括创建用户.设置和修改密码)以及使用第三方的认证方式,如facebook,googl ...
- Android 高级UI设计笔记18:实现圆角图片
1. 下面我们经常在APP中看到的圆角图片,如下: 再比如:微信聊天会话列表的头像是圆角的. 2. 下面分析一个Github的经典: (1)Github库地址: https://github.com/ ...
- HTML笔记1
HTML和css技术 HTML和css技术 html的介绍 网页的基本结构 今天学习的标签 标签属性 浏览器 DW快捷键 相对路径和绝对路径 HTML当中的颜色模式 网页当中常用的图片格式 html的 ...
- 通用权限底层研究:Web应用限制IP访问的功能实现
如果你的web应用受到恶意扫描或攻击,你会怎么处理呢?大多数时候从应用日志里可以看到恶意扫描或攻击,遇到此类情况,如有一个可以进行IP访问控制的功能就好些了. 现将在MVC下实现的一个IP访问限制功能 ...
- 【Android 界面效果31】Android--侧滑菜单应用的实现
侧滑菜单应用现在非常多,而且实现方式也多种多样.通过在网上的多方查找,我找到郭霖少侠的这篇文章:http://blog.csdn.net/guolin_blog/article/details/874 ...
- 【Android 界面效果19】Android中shape的使用
Android中常常使用shape来定义控件的一些显示属性,今天看了一些shape的使用,对shape有了大体的了解,稍作总结: 先看下面的代码: <shape> ...