UIActionSheet
- 繼承自UIView
- IOS9后蘋果不再建議使用UIActionSheet脊框,而是使用UIAlertController(IOS8推出),因此要注意版本適配
UIActionSheet的實現(xiàn)指示器效果
- (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按鈕執(zhí)行的代碼
}