弹框控件 UIAlertView UIActionSheet

 

// 创建弹框

 


从底部弹出,一般用于危险操作

UIActionSheet *sheet = [[UIActionSheet alloc] initWithTitle:@"恭喜通关" delegate:nil cancelButtonTitle:@"取消" destructiveButtonTitle:@"确定" otherButtonTitles:@"其他", nil];

[sheet showInView:self.view];

从中间弹出

UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"恭喜" message:@"通关了!!!!敬请期待!!!!" delegate:self cancelButtonTitle:@"取消" otherButtonTitles:@"好的", nil];
alert.tag = 10;
[alert show];

posted @ 2016-04-03 18:23  EricSun  阅读(173)  评论(0编辑  收藏  举报