我有UIAlertView與文本字段。uialertview textfield隱形ios 10.1.1
UIAlertView *corrmsg=[[UIAlertView alloc] initWithTitle:@"" message:@"Enter Password" delegate:self cancelButtonTitle:@"Cancel" otherButtonTitles:@"OK",@"Forgot Password", nil];
corrmsg.alertViewStyle = UIAlertViewStylePlainTextInput;
[corrmsg show];
[corrmsg release];
在iPad上的iOS 9.1.1文本字段成爲無形的,沒有光標,沒有包裝,雖然鍵盤上來和工作正常,如果你只是一味地鍵入英寸
任何人有線索怎麼解決這個問題?
切換到UIAlertController但這並沒有幫助:(
UIAlertController *alertController=[UIAlertController alertControllerWithTitle:@"" message:@"Enter Password" preferredStyle:UIAlertControllerStyleAlert];
[alertController addTextFieldWithConfigurationHandler:^(UITextField *textField){
textField.placeholder = NSLocalizedString(@"Enter Password", @"Password");
}];
[alertController addAction:[UIAlertAction actionWithTitle:@"OK" style:UIAlertActionStyleDefault handler:^(UIAlertAction *action) {
[self okBttn:alertController.textFields.firstObject.text];
}]];
[alertController addAction:[UIAlertAction actionWithTitle:@"Forgot Password" style:UIAlertActionStyleDefault handler:^(UIAlertAction *action) {
[self forgotPasswordBttn];
}]];
[alertController addAction:[UIAlertAction actionWithTitle:@"Cancel" style:UIAlertActionStyleDefault handler:^(UIAlertAction *action) {
[self cancelBttn];
}]];
[self presentViewController:alertController animated:YES completion:nil];
[alertController release];
UPDATE:?提升部署目標> 9.0固定UIAlertController
'UIAlertView'已被棄用一段時間了。使用'UIAlertController'。 – rmaddy
嗨rmaddy,切換到UIAlertController - 同樣的故事,任何其他想法? –
將depl traget升級到> 9.0固定UIAlertController –