UIActionSheet定制 [英] UIActionSheet Customization

查看:95
本文介绍了UIActionSheet定制的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们可以更改在UIActionSheet中出现破坏性按钮和其他按钮的顺序。默认情况下,破坏性按钮(红色)出现在其他按钮上方,在我的应用程序中,我希望其他按钮显示在破坏性按钮上方。

Can we change the order in which the destructive button and Other buttons appear in an UIActionSheet. By default the destructive button (red colored) appears above other buttons, in my app I would like the other buttons to appear above the destructive button.

推荐答案

您可以使用UIActionSheet属性destructiveButtonIndex来将UIActionSheet中的任何按钮设为销毁按钮,例如

You can make any button in the UIActionSheet as destruction button by using the UIActionSheet property destructiveButtonIndex like,

actionSheet.destructiveButtonIndex = 1;

这篇关于UIActionSheet定制的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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