可能重复:
UIAlertView not showing message textUIAlertView中在横向模式下不显示消息
我试图创建在横向模式下的应用程序的简单UIAlertView中,但我看到的是标题和按钮,但没有实际的消息。
它与屏幕上UIAlertView的可用空间有关,就好像我删除了几个按钮,然后消息显示正常。
有没有办法强制UIAlertView调整自己的大小以适应?
相关的代码是在这里
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:NSLocalizedString(@"Free Update",nil)
message:NSLocalizedString(@"There is a new version of this app available in the App Store. Download it now.",nil)
delegate:self
cancelButtonTitle:NSLocalizedString(@"Don't remind me",nil)
otherButtonTitles:NSLocalizedString(@"Download",nil), NSLocalizedString(@"Remind me later", nil), nil];
[alert show];
[alert release];
这是结果:
您如何使用操作表?它总是显示标题,它意在用于采取行动。警报视图有很多缺陷(不是实现,而是设计),我谨慎使用它们。 –
参见:http://stackoverflow.com/questions/7901834/uialertview-with-3-buttons-hides-message-in-landscape-mode – 2011-11-17 12:40:24