UIALertView multiple buttons with text

user1970792 picture user1970792 · Jan 11, 2013 · Viewed 13.1k times · Source

I have an alertview with 3 buttons and text(label and NOT textView) If I jam it all together, it'll become ugly with this tiny scroll-text and all the buttons taking up most of the space. Does anyone know how to fix this?

Answer

Anoop Vaidya picture Anoop Vaidya · Jan 11, 2013

Why don't you try to create a custom View for this.

You can use as you want to customize, size, color, background etc.

And show it as a modal window/view.


If you still want to use alertView then you can give spacing as:

UIAlertView *alert=[[UIAlertView alloc]initWithTitle:@"Title" message:@"\n\n!\n\n\n\n" delegate:self cancelButtonTitle:@"Button 1" otherButtonTitles:@"Button 2",@"Button 3", nil];
[alert show];