zoukankan      html  css  js  c++  java
  • 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
    
  • 相关阅读:
    toastr.js插件用法
    JS组件系列——Bootstrap文件上传组件:bootstrap fileinput
    定制jQuery File Upload为微博式单文件上传
    微信开放平台开发(2) 网站应用微信登录
    MVC-Model数据注解(三)-Remote验证的一个注意事项
    FormsAuthentication.SetAuthCookie
    async/task/await
    Using Repository Pattern in Entity Framework
    jquery.inputmask 输入框input输入内容格式限制插件
    C# Random 生成不重复随机数
  • 原文地址:https://www.cnblogs.com/0515offer/p/4638821.html
Copyright © 2011-2022 走看看