私はこのコードを持っています:
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.
それは確かに役立つからです。
何か案は?
ありがとう!