//
// ViewController.m
//
// Created by dengw on 15/7/28.
// Copyright (c) 2015年 dengwei. All rights reserved.
//
#import "ViewController.h"
@interface ViewController ()<UIAlertViewDelegate,UIActionSheetDelegate>
- (IBAction)alertViewButton:(id)sender;
- (IBAction)actionSheetButton:(id)sender;
?
@end
@implementation ViewController
- (void)viewDidLoad {
[super viewDidLoad];
// Do any additional setup after loading the view.
}
- (IBAction)alertViewButton:(id)sender {
????UIAlertView *alertView = [[UIAlertView alloc] initWithTitle:@"Alert" message:@"Alert text goes here" delegate:self cancelButtonTitle:@"NO" otherButtonTitles:@"YES", nil];
????[alertView show];
}
?
#pragma mark? 实现UIAlertViewDelegate
-(void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex
{
????NSLog(@"buttonIndex = %li", buttonIndex);
}
- (IBAction)actionSheetButton:(id)sender {
????UIActionSheet *actionSheet = [[UIActionSheet alloc] initWithTitle:nil delegate:self cancelButtonTitle:@"取消" destructiveButtonTitle:@"破坏性按钮" otherButtonTitles:@"Facebook", @"新浪微博", nil];
????actionSheet.actionSheetStyle = UIActionSheetStyleAutomatic;
????[actionSheet showInView:self.view];
}
?
#pragma mark? 实现UIActionSheetDelegate
-(void)actionSheet:(UIActionSheet *)actionSheet clickedButtonAtIndex:(NSInteger)buttonIndex
{
????NSLog(@"buttonIndex = %li", buttonIndex);
}
@end
热门文章更多>>
标签更多>>
专题更多>>
最新文章更多>>
- 华为m3和ipad air2哪个好?华为平板m3和ipad air2详细区别对比评测
- 华为平板M3怎么调节色温保护眼睛?
- 8.4英寸华为平板M3真机图赏:主打影音视频和游戏
- 华为平板M3怎么使用自带的云服务导入旧手机资料数据?
- 怎么将之前手机中的就资料导入华为平板M3?
- 华硕ZenPad 3S 10值得买吗?华硕ZenPad 3S 10平板全面评测
- 小米平板2的16G内存够用吗? 16GB版小米平板2可以刷Win10系统吗?
- 华为平板M3值得买吗 华为平板M3全面评测图解
- 华为平板M3和小米平板2哪个好?小米平板2和华为平板M3详细区别对比评测
- 华为平板M3有几个版本?华为平板M3 WiFi版与LTE版各版本区别对比评测
没有猫也没有你99386891