0

オブジェクトを選択するときUIViewController <GLKViewDelegate>に簡単なテキスト入力を行う必要があります。

UIKitには、すぐに使用できるシンプルな複数行のテキスト入力ポップアップがありますか?

私はすでにで見つけましUIAlertViewalertViewStyle=UIAlertViewStylePlainTextInputが、それは単純な行入力にすぎません。

どうも

4

2 に答える 2

3

ではなくではなくテキスト入力に相当するものがある場合UIAlertView、答えはノーです。UITextViewUITextField

于 2012-05-31T11:28:54.200 に答える
0

あなたの質問はあまり明確ではありません。しかし、 UIActionSheetが必要なものだと思います。

編集

あなたはこれを試すことができます

これをun.hファイルに設定し、デリゲートを次のように設定します

@interface NameOfYourClass : UIViewController <UIActionSheetDelegate> 

そして、このコードをun.mファイルに追加します

UIActionSheet *actionSheet = [[UIActionSheet alloc] initWithTitle:@"Action Sheet" delegate:self cancelButtonTitle:@"Cancel Button" destructiveButtonTitle:@"Destructive Button" otherButtonTitles:@"Other Button 1", @"Other Button 2", nil];

    actionSheet.actionSheetStyle = UIActionSheetStyleBlackOpaque;

    [actionSheet showInView:self.view];

Edit2

だからここにあなたのallertviewにテキストフィールドを追加するために何をすべきかがあります

UIAlertView *newAlert =[[UIAlertView alloc] initWithTitle:@"ADD item" message:@"Put it blank textfield will cover this" delegate:self cancelButtonTitle:@"Cancel" otherButtonTitles:@"OK", nil];

    UITextField *newTextField = [[UITextField alloc] initWithFrame:CGRectMake(12.0, 45.0, 260.0, 25.0)];
    newTextField.text=@"";
    [newTextField setBackgroundColor:[UIColor whiteColor]];
    [newTextField setKeyboardAppearance:UIKeyboardAppearanceAlert];
    [newTextField setAutocorrectionType:UITextAutocorrectionTypeNo];

    [newTextField setTextAlignment:UITextAlignmentCenter];
    [newAlert addSubview:newTextField];

    [newAlert show];
于 2012-05-31T11:25:28.160 に答える