views:

361

answers:

2

Is there a way to specify the size of a UIAlert button?

Is there a way to specify the layout of buttons on UIAlert? Like having three buttons next to each other and a cancel button on the buttom?

+1  A: 

Is there a way to specify the size of a UIAlert button?

No easy way. The buttons must fill the whole dialog horizontally unless you heavily override its internal -layout method, or mess with the frames of the UIAlert's subview after it's shown.

Is there a way to specify the layout of buttons on UIAlert? Like having three buttons next to each other and a cancel button on the buttom?

There used to be an int numberOfRows property to specify how the buttons distribute, but this is now ignored for UIAlertView.

KennyTM
A: 

You can add a subview with any buttons you'd like to the UIAlertView and grow its height to match. It is difficult to get it to lay out properly if you use any standard alert buttons, titles, or messages.

Peter DeWeese