I created a uiAlertView that contains textFields for an iPad. This means that in landscape mode, the alert is covered up by the keyboard. I searched for a开发者_如何转开发 solution and I came up with
alert.transform = CGAffineTransformTranslate(alert.transform, 0.0, 150.0);
However, all this seems to do is make the alert "jump" up to 150 and then come back down to its default place. How can I make the alert stay up high without jumping back down?
Thanks!
You can set the text field's keyboardAppearance
to UIKeyboardAppearanceAlert
.
aTextField.keyboardAppearance = UIKeyboardAppearanceAlert;
There are a few other tricks to putting textfields on UIAlertView. See my blog post on the subject.
精彩评论