我有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 –