- (void)viewDidLoad {
[super viewDidLoad];
// Do any additional setup after loading the view, typically from a nib.
UIActionSheet * actionSheet=[[UIActionSheet alloc]initWithTitle:@"提示" delegate:self cancelButtonTitle:@"取消" destructiveButtonTitle:@"确定" otherButtonTitles: @"按钮1",@"按钮2" , nil];
[actionSheet showInView:self.view];
}
//协议方法
-(void)actionSheet:(UIActionSheet *)actionSheet clickedButtonAtIndex:(NSInteger)buttonIndex{
NSLog(@"你点击了第%ld个按钮",buttonIndex);
//按钮不消失
[self viewDidLoad];
}