Search code examples
iphonexcodebuttonalertview

UIALertView multiple buttons with text


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?


Solution

  • 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];