//
// 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的更多相关文章

随机推荐

  1. 分享:Android中利用机器码注册机制防止破解(转)

    转自:http://blog.csdn.net/huzgd/article/details/6684094 最近做一个Android应用时遇到这个问题,客户要求功能必须注册才能使用,而程序本身又不是联 ...

  2. 读取svg图片为UIBezierPath,开心做动画

    动画预览 先扯淡 最近手痒又想整点动画玩玩,但是想了几个主意发现稍微复杂一点的手写都一定会累爆.这篇文章记录一下今天折腾的一个方案.说来简单,就是用矢量设计工具舒舒服服的做好设计,然后输出成 svg ...

  3. android自定义TabWidget样式

    先看看效果图吧,个人觉得图标丑了点,不过还行,自己用PS做的 下面是全部代码和流程,一定要按流程顺序来,不然错误! 1.tabhost.xml <TabHost xmlns:android=&q ...

  4. centos 7 没有ifconfig 命令

    centos 7 没有ifconfig 命令: 安装命令: yum install net-tools

  5. 0c-40-ARC下多对象内存管理

    1个人拥有1条狗. 问题1:人拥有狗作为成员变量,此时使用weak,释放过程是什么样? Person *p = [Person new]; Dog *d = [Dog new]; //设置人拥有dog ...

  6. 关于apache的重启

    一:Apache重起的最好方法apachectl graceful http://blog.csdn.net/qianling3439/article/details/8622618 二:请问apac ...

  7. JqGrid TreeView使用

    1.前端 <script src="@Url.Content("~/Scripts/jquery/jquery-1.9.0.min.js")" type= ...

  8. ava SE ---逻辑运算符

      java中有4个逻辑运算符:&与,&& 逻辑与,| 或,|| 逻辑或这些运算符要求操作数和结果值都是布尔型. a&&b   a||b 1) 逻辑与& ...

  9. [Java] Servlet 3 —— 用Java生成GET/POST请求

    Servlet是SUN指定的Java服务器端编程规范,用以处理来自客户端的请求,处理并做出响应的一套基础API.Servlet是运行在 Servlet容器中的Java小程序,容器运行在服务器端,服务器 ...

  10. 【阿里云产品公测】阿里云ACE部署通用完整教程及评测

    [阿里云产品公测]阿里云ACE部署通用完整教程及评测 作者:阿里云用户bailimei ACE应该是目前在公测的服务中应用最广泛的一项服务.在公测云引擎ACE前曾使用过新浪SAE,而ACE给我的最初印 ...