I want to display a message using UIAlertView and there will be two buttons. As one of the buttons has a long name, It's not appropriate to display both of them in one line. I know that when there are more than two buttons, all of them will be displayed each in a row. How can I display these two buttons in two line? Thanks.
Asked
Active
Viewed 1,886 times
1
-
For an idea on how subclassing of UIAlertView (as mentioned by MattyG) could look like, have a look at the following answer: http://stackoverflow.com/a/16526932/378977 – Flo May 13 '13 at 16:39
1 Answers
1
There is no officially documented way to do this. UIAlertView is a subclass of UIView. So you could traverse its subclasses to find the buttons, and transform their position and size. This is probably a bad idea though. If Apple changes it's implementation of the UIAlertView, it might break your code. Your app might also be rejected for customizing the UIAlertView. Eg see this answer.
Instead, you should consider changing the title of your button to be shorter, or create your custom UIView subclass that you present modally.