views:

278

answers:

1

In a UIAlertView I need to align buttons into rows so that there are either 2 in each row or 3 in each row. This is for an appstore app so I need to use documented methods. So obviously I can't use setNumberOfRows: for this. Suggestions on how I could achieve the same effect?

+1  A: 

You can't customize UIAlert to any meaningful extent.

In any case, it sounds like you don't want an alert view but rather sheet or a modal view.

UIAlert is restricted for a reason. It's supposed to present a simple, standardized (and easy to call) view to draw the users attention to a specific issue. You don't want to use it for complex choices.

If you create your own view and present it modally. It will popup above the other views just like an alert but you will be able to customize its appearance and behavior as you wish.

TechZen
Well i do need it to draw attention to a specific issue. I just want to have 3 buttons but have them aligned in one row instead of a separate row for each (since this is default behavior for an alert with more than 2 buttons (including the cancel)). An ActionSheet is not really suitable for what i need. I suppose i will have to deal with the ugly layout.
JStraitiff