Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

chhoda

macrumors 6502
Original poster
Oct 25, 2008
285
1
Can I put more than 2 buttons in UIAlertView and customize them ? and specify different actions for all of them ?

regards
ch
 
Can I put more than 2 buttons in UIAlertView and customize them ?
Yes, you can. Check out the developer documentation on the UIAlertView initWithTitle:message:delegate:cancelButtonTitle:eek:therButtonTitles method.

...and specify different actions for all of them ?
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.
 
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
 
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...
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.