UIActionSheet
- 继承自UIView
- IOS9后苹果不再建议使用UIActionSheet,而是使用UIAlertController(IOS8推出),因此要注意版本适配
UIActionSheet的实现指示器效果
- (void)useActionSheet
{
UIActionSheet *sheet = [[UIActionSheet alloc] initWithTitle:@"警告:确定要删除它?" delegate:self cancelButtonTitle:@"取消" destructiveButtonTitle:@"确定" otherButtonTitles:@"随便", nil];
[sheet showInView:self.view];
}
#pragma mark - <UIActionSheetDelegate>
- (void)actionSheet:(UIActionSheet *)actionSheet clickedButtonAtIndex:(NSInteger)buttonIndex
{
// 点击sheet按钮执行的代码
}