在ios 7中以横向模式向下移动UIAlertView

时间:2013-10-23 06:42:22

标签: ios objective-c ios7 uialertview

alert = [[UIAlertView alloc] initWithTitle:@"Enter Student Name" message:@"" delegate:self cancelButtonTitle:@"Cancel" otherButtonTitles:@"Save", @"Save and Add", nil];
                alert.tag = 1;
                alert.alertViewStyle=UIAlertViewStylePlainTextInput;
                [alert show];

它在potrait模式下工作得很漂亮,但在横向显示我的UITextfield离开屏幕。现在我想稍微向下移动一个alertView框架,以便它可见。

enter image description here

1 个答案:

答案 0 :(得分:2)

不幸的是你不能改变iOS7中UIAlertView设计中的任何东西,你应该按原样使用它,你有三种选择:

  • 取消取消按钮(如果我是你,我会这样做)。
  • 使用cocoacontrols.com中的自定义UIAlertView,并将三个按钮放在同一行。
  • 使用另一个控件,如popover或modal。
相关问题