У меня есть этот код:
UIActionSheet *actionSheet = [[[UIActionSheet alloc]
initWithTitle:@"Illustrations"
delegate:self
cancelButtonTitle:@"Cancel"
destructiveButtonTitle:nil
otherButtonTitles: @"ABC", @"XYZ",
nil] autorelease];
UIImage *image = // whatever, snip
if (image != nil)
{
[actionSheet addButtonWithTitle:@"LMNOP"];
}
и это делает отличную работу по добавлению моей кнопки LMNOP условно.
... ПОСЛЕ кнопки отмены.
Как я могу создать свой лист действий с условной кнопкой? К сожалению, я не могу:
UIActionSheet *actionSheet = [[[UIActionSheet alloc]
// ... etc.
otherButtonTitles: someMutableArray
// ... etc.
потому что это, безусловно, поможет.
Любые идеи?
Спасибо!