如何在 IOS 中创建操作表删除 [英] How to create action sheet Delete in IOS

查看:29
本文介绍了如何在 IOS 中创建操作表删除的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想用红色的删除按钮和取消按钮创建与下面相同的操作表.我怎样才能做到这一点?非常感谢

I want to create action sheet same bellow picture with Delete button red color and Cancel button. How can i do that? Thanks much

推荐答案

只需使用该代码即可使删除按钮成为破坏性按钮

Simply use that code make make delete button as destructiveButton

UIActionSheet *actionSheet = [[UIActionSheet alloc] initWithTitle:@"Are you sure you want to delete this backup?" delegate:self cancelButtonTitle:@"Cancel" destructiveButtonTitle:@"Delete Backup" otherButtonTitles:nil,nil];
actionSheet.actionSheetStyle = UIActionSheetStyleBlackOpaque;
[actionSheet showInView:self.view];

这篇关于如何在 IOS 中创建操作表删除的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆