views:

534

answers:

2

I've seen a number of blogs claim that UIAlertView from firmware 3.0 onwards will show a table view if too many buttons are added to it to fit in the alert box. However, I don't seem to find this the case, either in the simulator or on the device. Before I look at using one of the mechanisms for manually adding a tableview to an alert, I want to make sure I'm not replicating something the OS already does.

A: 

I've never heard of this behavior until you asked, and I've never observed it. Reading the entire UIAlertView documentation leads me to believe that this is not the case.

It sounds like you already tried adding a bunch of buttons to the UIAlertView and weren't able to replicate the behavior, so I'd call this one busted.

Jed Smith
+3  A: 

No, the thing that shows a table view is UIActionSheet when it has too many items. It's really ugly.

ugly!

jtbandes
Thanks, I'd seen a few posts like this one that refer to the UIAlertView - http://www.skylarcantu.com/blog/2009/10/10/embedding-uitables-into-uialertviews/ - but I think it must be the UIActionSheet that they mean.
Ed Anuff
Sure is ugly. Is there no way we can avoid this (other than building the app in 2.x)?
lostInTransit
Yeah, just don't put so many buttons in an action sheet. There's hardly ever a need for it anyway.
jtbandes
There are no real reasons for that many buttons on an action sheet. That many choices really require a view. When you think about it the function probably is not within the description of what Apple thinks a Action Sheet is made for.
Jann