我々は破壊的なボタンと他のボタンがUIActionSheetに表示される順序を変更することができます。デフォルトでは、破壊ボタン(赤色)が他のボタンの上に表示されます。私のアプリでは、他のボタンを破壊ボタンの上に表示します。
4
A
答えて
2
あなたは、のような
actionSheet.destructiveButtonIndex = 1;
をUIActionSheetプロパティdestructiveButtonIndexを使用して破壊ボタンとしてUIActionSheetで任意のボタンを作ることができます
6
問題ありません。
新しいUIActionSheetインスタンスを割り当てて初期化し、–addButtonWithTitle:
を使用して、順番に(順番に)ボタンを追加します。このメソッドは、ボタンが追加されたインデックスを返します。次に、無効ボタンのインデックスを-setDestructiveButtonIndex:
で設定できます。
関連する問題
- 1. UIActionSheet buttonIndex
- 2. メインビューaにUIActionsheet
- 3. UIActionSheet cancelButtonTitle ipad
- 4. UIActionSheet UI仕様
- 5. UIActionSheetとUIView
- 6. Android:iOS UIActionSheet相当
- 7. UIActionSheetボタンの色
- 8. UIActionSheetを表示
- 9. UIActionSheet showFromRectオートローテーション
- 10. UIActionSheetの作成
- 11. 通知センターとUIActionSheet
- 12. UIActionSheet奇妙なアニメーション?
- 13. iPadのUIActionSheetのキャンセルボタン
- 14. UIActionSheet内の[Undo]ボタン
- 15. UIActionSheetの終了後にUIActionSheet項目を表示する方法
- 16. UIActionSheetからUIPopoverControllerにアクセス
- 17. iPadのShareKitのUIActionsheet問題
- 18. イメージをUIActionSheetに追加
- 19. UIACtionSheet代議員質問
- 20. UIActionSheetボタンは、新しいビュー
- 21. TabBarControllerのUIActionSheet内のUIPIckerView
- 22. UIPickerViewのUIActionSheetと前のボタン
- 23. UIActionSheetの破壊ボタンのガイドライン
- 24. UIActionSheetでUIAlertViewを表示
- 25. フレームをUIActionSheetに設定
- 26. iPad UIActionSheetを外側にタップすると、UIActionSheetの状態になりますか?
- 27. AppDelegateのUIActionSheetを解除する
- 28. UIActionSheetボタン新しいビューをロードする
- 29. 複数の赤色/破壊ボタンUIActionSheet
- 30. iPhone UIActionSheetが自動回転しない