gpt4 book ai didi

ios - UIAlertActionStyleDestructive 和 UIAlertActionStyleCancel 有什么区别?

转载 作者:行者123 更新时间:2023-12-01 18:12:15 25 4
gpt4 key购买 nike

UIAlertActionStyleDestructive 和 UIAlertActionStyleCancel 看起来和我很相似。根据文档:

UIAlertActionStyleCancel: Apply a style that indicates the action cancels the operation and leaves things unchanged.





UIAlertActionStyleDestructive: Apply a style that indicates the action might change or delete data.



不管风格如何, Action 仍然有一个完成处理程序,你可以在其中做任何你认为合适的事情。 “破坏性”和“取消”的存在是否仅出于组织目的,或者是否有一些更大的功能性目的是同时具有这两种选择?

最佳答案

破坏性按钮通常具有鲜红色背景,而取消按钮将是常规的灰色按钮。

关于ios - UIAlertActionStyleDestructive 和 UIAlertActionStyleCancel 有什么区别?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28423125/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com