AndroidだとAlertDialogにビューを追加して、そんなに苦労なかったが、いろいろ調べてみて、iOSだと意外に、この情報がなかった。iOS5以上とのことだが
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"確認" message:@"サーバー登録しますか?" delegate:self cancelButtonTitle:@"いいえ" otherButtonTitles:@"はい", nil]; [alert setAlertViewStyle:UIAlertViewStylePlainTextInput]; [alert show];
でテキストボックス付きのアラーとビューがつくれる。テキストボックスの内容を取得するときはデリゲート先で
NSLog(@"%@",[[alertView textFieldAtIndex:0] text]);
コンソールに出力した例ですが、これで取得できます。
Thanks for another informative site. The place else may I get that type of info written in such an ideal means? I have a undertaking that I’m simply now running on, and I’ve been at the look out for such info.