オブジェクトを選択するときUIViewController <GLKViewDelegate>
に簡単なテキスト入力を行う必要があります。
UIKitには、すぐに使用できるシンプルな複数行のテキスト入力ポップアップがありますか?
私はすでにで見つけましUIAlertView
たalertViewStyle=UIAlertViewStylePlainTextInput
が、それは単純な行入力にすぎません。
どうも
オブジェクトを選択するときUIViewController <GLKViewDelegate>
に簡単なテキスト入力を行う必要があります。
UIKitには、すぐに使用できるシンプルな複数行のテキスト入力ポップアップがありますか?
私はすでにで見つけましUIAlertView
たalertViewStyle=UIAlertViewStylePlainTextInput
が、それは単純な行入力にすぎません。
どうも
ではなくではなくテキスト入力に相当するものがある場合UIAlertView
、答えはノーです。UITextView
UITextField
あなたの質問はあまり明確ではありません。しかし、 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];