//
// 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. Linux makefile 教程 很具体,且易懂

    近期在学习Linux下的C编程,买了一本叫<Linux环境下的C编程指南>读到makefile就越看越迷糊,可能是我的理解能不行. 于是google到了下面这篇文章.通俗易懂.然后把它贴出 ...

  2. 【JavaScript】关于JS中的constructor与prototype

    最初对js中 object.constructor 的认识: 在学习JS的面向对象过程中,一直对constructor与prototype感到很迷惑,看了一些博客与书籍,觉得自己弄明白了,现在记录如下 ...

  3. 【JavaScript】页面加载性能优化

    核心在于:减少加载时间 1.减少请求次数 2.缩减文件大小 3.异步加载---------------------->比如document.write 4.延迟加载.动态加载---------- ...

  4. Topcomponent --sighoff

    Topcomponent --sighoff 实现一个置于右边框的Topcomponent: 1.可远程同步更新(根据远程的xml文件),修改(增删)该xml文件,查看.刷新等 2.打包工程,记录该打 ...

  5. [AngularJS] Using Services in Angular Directives

    Directives have dependencies too, and you can use dependency injection to provide services for your ...

  6. JRebel_修改class后无法正确调试问题解决【2014-03-12】

    原文地址:http://www.cnblogs.com/hbbbs/p/3596179.html 现象 修改了class,编译后,JRebel自动装载到Web容器中.但此时调试这个类会发现无法正常调试 ...

  7. oc-15-枚举结构体

    Cat.h #import <Foundation/Foundation.h> // 颜色的枚举 typedef enum{ ColorBlack, ColorYeallow } Colo ...

  8. C# 网络通信大小端转换类

    本篇文章主要介绍了"C# 网络通信大小端转换类" using System;namespace Framework.NetPackage.Common { /// <summ ...

  9. mysql常用备注

    一:One Table  have only one Auto_Increment that column is must to be Primary key. (自增加的字段必须是主键且是数字类型) ...

  10. Java String Class Example--reference

    reference:http://examples.javacodegeeks.com/core-java/lang/string/java-string-class-example/ 1. Intr ...