我有一個UIAlertViewStylePlainTextInput的問題。我使用textfield獲得了Alert,但沒有鍵盤出現..?這裏是我的代碼:沒有鍵盤與UIAlertViewStylePlainTextInput?
UIAlertView *enter = [[UIAlertView alloc] initWithTitle:@"Highscores" message:@"Please Enter Your Name" delegate:self cancelButtonTitle:@"Okay" otherButtonTitles:@"Abbrechen" nil];
enter.alertViewStyle = UIAlertViewStylePlainTextInput;
UITextField *theTextField = [enter textFieldAtIndex:0];
theTextField.placeholder = @"Your Name";
theTextField.keyboardAppearance = UIKeyboardAppearanceAlert;
theTextField.selected = NO;
[enter show];
我已經試過沒有
UITextField *theTextField = [enter textFieldAtIndex:0];
theTextField.placeholder = @"Your Name";
theTextField.keyboardAppearance = UIKeyboardAppearanceAlert;
theTextField.selected = NO;
一部分,但仍然沒有鍵盤上來。
(我測試過它在我的設備上,並在模擬器上)
你有關於任何想法?
預先感謝您。
你的意思'[進入becomeFirstResponder]'?您當前的代碼隱藏鍵盤 – BBog 2012-09-20 07:15:45