重新排列UIAlertView按钮布局

时间:2013-03-12 14:21:03

标签: iphone ios objective-c uialertview

只是一个简单的问题。 是否可以更改UIAlertView按钮的布局?其中两个看起来不错 Two buttons

然而,三个按钮和更多浪费太多的空间,有没有办法重新安排它们?所以它们是水平顺序,就像两个按钮一样?

默认布局为:

Three buttons

我想到的只有创建视图,在该视图上添加按钮并将其作为子视图添加到UIAlertView ...

2 个答案:

答案 0 :(得分:2)

你必须创建自己的自定义AlertView,我担心:

  

子类注释

     

UIAlertView类旨在按原样使用,不支持子类化。

     

此类的视图层次结构是私有的,不得修改。    - Apple

关于自定义UIAlertViews,以下链接可能是您所追求的 - https://github.com/gpambrozio/BlockAlertsAnd-ActionSheets

答案 1 :(得分:1)

以下是您想要的自定义UIAlertView的最佳链接。

https://github.com/stavash/UIBAlertView

https://github.com/TomSwift/TSAlertView

For more get custom UIAlertView this is The Best site for any Custom Controls.

选择链接上方的任何一个表单,并根据您的要求添加。

相关问题