简体   繁体   中英

Change UIAlertView button layout

I want to show two buttons in 'UIAlertview'. Because the button text is very long, I want the buttons to appear one above the other in a vertical stack instead of side by side. Is it possible to do this?

Unfortunately your only choices are to either make the button text shorter or to add another button. UIAlertView only lays out rows of buttons when there are more than two.

Aside from that, you can subclass UIAlertView, but it would probably be easier to simply create your own custom view / view controller at that point.

您将需要子类化UIAlertView并使用您所描述的按钮创建自己的自定义警报。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM