UIActionSheet
2015-06-21 16:27
405 查看
// // UIActionSheetViewController.m // AppUI组件学习 // // Created by 麦子 on 15/6/18. // Copyright (c) 2015年 麦子. All rights reserved. // #import "UIActionSheetViewController.h" @interface UIActionSheetViewController () @end @implementation UIActionSheetViewController - (void)viewDidLoad { [super viewDidLoad]; self.view.backgroundColor = [UIColor blackColor]; [self createView:self.view]; } - (void)createView:(id)uiView{ UIView *view = (UIView *)uiView; UIActionSheet *actionSheet = [[UIActionSheet alloc] initWithTitle:@"请回答" delegate:self cancelButtonTitle:@"否" destructiveButtonTitle:@"是" otherButtonTitles:nil, nil]; actionSheet.delegate = self; [actionSheet showInView:view]; } - (void)actionSheet:(UIActionSheet *)actionSheet clickedButtonAtIndex:(NSInteger)buttonInde{ if (buttonInde == 0) { NSLog(@"确定,"); }else if(buttonInde == 1){ NSLog(@"取消"); }else{ NSLog(@"这是什么");// destructive 这个按钮时最后的 } } @end
相关文章推荐
- UIAlertView&UIActionSheet
- UIAlertView、UIActionSheet
- UIActionSheet笔记
- UIActionSheet cancel 按钮响应不灵敏
- MyAlertViewActionSheet
- 【深入浅出ios开发】UIActionSheet
- IOS-UIAlertView和UIActionSheet
- UIActionSheet的使用
- 自定义UIAlertView
- iOS之UIActionSheet
- IOS开发-UIActionSheet
- UIImagePickerController的简单使用
- [源码下载]UIActionSheet详解
- UIAction Sheet 的使用
- iOS8开发之iOS8的UIAlertController
- CGContextSetFillColorWithColor invalid context 0x0
- IOS学习笔记(九)之UIAlertView(警告视图)和UIActionSheet(操作表视图)基本概念和使用方法
- IOS学习笔记(九)之UIAlertView(警告视图)和UIActionSheet(操作表视图)基本概念和使用方法
- iOS7的兼容性
- iPhone开源系列:UIAlertView-Block 推荐