tags:

views:

38

answers:

1

I am initializing a UIActionSheet and I would like to populate its "otherButtonTitles" from an Array, Set, or whatever, like this

UIActionSheet* aSheet = [[UIActionSheet alloc] initWithTitle:"hi There" 
delegate:self
cancelButtonTitle:nil
destructiveButtonTitle:nil
otherButtonTitles:[mySetOfStringsOrWhatever allObjects], nil];

is that possible?

(I have tried this but Xcode doesn't like it)

thanks in advance.

+1  A: 

I don't believe so, but you can pass nil then iterate through your array/set/whatever and call addButtonWithTitle

See Create UIActionSheet otherButtons by passing in array not varlist

Eric
ahhh... that's it. thanks!
Digital Robot