我为iPad创建了一个包含textFields的uiAlertView。这意味着在横向模式下,警报被键盘覆盖。我寻找一个解决方案,我想到了
alert.transform = CGAffineTransformTranslate(alert.transform, 0.0, 150.0);
然而,所有这些似乎只是使警报"跳"到150,然后回到默认位置。我怎样才能使警报保持在高位而不跳下来呢?
谢谢!
可以设置文本字段的keyboardAppearance
为UIKeyboardAppearanceAlert
。
aTextField.keyboardAppearance = UIKeyboardAppearanceAlert;
在UIAlertView上放置文本域还有其他一些技巧。