横向模式下的 UIAlertView 不显示消息 [英] UIAlertView in landscape mode does not display message
本文介绍了横向模式下的 UIAlertView 不显示消息的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
可能的重复:
UIAlertView 不显示消息文本
我正在尝试为横向模式的应用程序创建一个简单的 UIAlertView,但我看到的只是标题和按钮,但没有实际消息.
I am trying to create a simple UIAlertView for an app in landscape mode but all I see is the title and buttons but no actual message.
它与屏幕上 UIAlertView 的可用空间有关,就好像我删除了几个按钮一样,消息显示正常.
It has something to do with the space available for the UIAlertView on the screen as if I remove a couple of the buttons then the message displays fine.
有没有办法强制 UIAlertView 调整自身大小以适应?
Is there a way to force the UIAlertView to resize itself to fit?
相关代码在这里
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];
这是结果:
推荐答案
最后,我们不得不从警报视图中删除一个按钮,使其在横向模式下工作.
In the end we had to drop one of the buttons from the alert view to make it work in landscape mode.
这篇关于横向模式下的 UIAlertView 不显示消息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文