UIAlertView

Discussion in 'iPhone/iPad Programming' started by chhoda, Nov 17, 2008.

  1. macrumors 6502

    Joined:
    Oct 25, 2008
    #1
    Can I put more than 2 buttons in UIAlertView and customize them ? and specify different actions for all of them ?

    regards
    ch
     
  2. macrumors 6502a

    Joined:
    Oct 24, 2008
    Location:
    Cambridge
    #2
  3. Moderator emeritus

    robbieduncan

    Joined:
    Jul 24, 2002
    Location:
    London
    #3
  4. Moderator

    dejo

    Staff Member

    Joined:
    Sep 2, 2004
    Location:
    The Centennial State
    #4
    Yes, you can. Check out the developer documentation on the UIAlertView initWithTitle:message:delegate:cancelButtonTitle:eek:therButtonTitles method.

    Kinda. When you implement the UIAlertViewDelegate protocol for your delegate, you can have the different actions if you code them based on what button was clicked in the alertView:clickedButtonAtIndex: method.
     
  5. thread starter macrumors 6502

    Joined:
    Oct 25, 2008
    #5
    but...

    thanks a ton... but I think i wont be able to customise it because i wanted to put a customtableview in place of message

    please correct me if i am wrong

    i tried doing uialertview initwithframe:CGRectMake(0, 0, 400, 400);
    [altV show];

    it seems this width height is not honoured...

    regards
    ch
     
  6. macrumors regular

    Joined:
    Mar 24, 2008
    #6
    I don't think initWithFrame works for UIAlertView. It doesn't work for some other UIKit classes too, i'm sure. It's always meant to go in the centre of the screen.

    If you wanted to adjust the X/Y coordinates, you could apply a tranform...
     

Share This Page