3 つのボタン (積み重ねられる) を持つ UIAlertView を作成しようとしています。キャンセル ボタンを他の 2 つのボタンの中間に配置したいと思います。cancelButtonIndex を 1 に設定しようとしましたが、他に 2 つのボタンがある場合は、インデックス 0 と 1 に配置するだけです。ボタンの名前を変更できることはわかっていますが、キャンセル ボタンの濃い青色の書式設定が必要です。 .
編集: ** 注意してください - タイトルの付いた 3 つのボタンを正しい順序で取得する方法は知っていますが、3 つのボタンすべてが本質的に「他の」ボタンのように見える場合に限ります。通常のキャンセル ボタンのように見えるように、キャンセルボタンの背景色を濃い青色にしたい。**
私はもう試した
UIAlertView *alert = [[[UIAlertView alloc] initWithTitle:title message:msg delegate:self cancelButtonTitle:@"Cancel" otherButtonTitles:button1Title,button2Title,nil] autorelease];
alert.cancelButtonIndex = 1;
[alert show];
と
UIAlertView *alert = [[[UIAlertView alloc] initWithTitle:title message:msg delegate:self cancelButtonTitle:@"Cancel" otherButtonTitles:nil] autorelease];
alert.cancelButtonIndex = 1;
[alert addButtonWithTitle:button1Title];
[alert addButtonWithTitle:button2Title];
[alert show];
と
UIAlertView *alert = [[[UIAlertView alloc] initWithTitle:title message:msg delegate:self cancelButtonTitle:@"Cancel" otherButtonTitles:addButtonWithTitle:button1Title,nil] autorelease];
alert.cancelButtonIndex = 1;
[alert addButtonWithTitle:button2Title];
[alert show];
無駄に。私がやろうとしていることを達成することさえ可能ですか?