-1

検索しようとしましたが、この「オプション ボックス」に適切な用語が見つかりませんでした。このリンクのようなオプション ボックスの例はありますか?

4

2 に答える 2

2

と呼ばれUIActionSheetます。

クラス リファレンスへのリンクは次のとおりです: http://developer.apple.com/library/ios/#DOCUMENTATION/UIKit/Reference/UIActionSheet_Class/Reference/Reference.html

そして、これがどのように機能するかの基本的な例です:

UIActionSheet *actionSheet = [[UIActionSheet alloc] initWithTitle:@"title" delegate:self cancelButtonTitle:@"cancel" destructiveButtonTitle:@"delete" otherButtonTitles:@"other 1", @"other 2", nil];
[actionSheet showInView:self.view];
于 2012-08-17T06:41:02.640 に答える
1

@NSNSPostWhenIdle: は正しく、次のように alertView を作成することもできます ...

UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"title" message:@"message" delegate:self cancelButtonTitle:@"cancel" otherButtonTitles:@"button",@"button1", nil];
    [alert show];

カスタム ボタンが必要な場合は、UIButtons を作成し、alertView のサブビューとして追加します。

お役に立てると思います。

于 2012-08-17T06:51:01.500 に答える