OGeek|极客世界-中国程序员成长平台

标题: iphone - UIActionSheet 高度在 3.5 英寸设备上为 4 英寸 [打印本页]

作者: 菜鸟教程小白    时间: 2022-12-12 22:56
标题: iphone - UIActionSheet 高度在 3.5 英寸设备上为 4 英寸

我目前正在更新我的应用程序以支持 4 英寸 iPhone 5 屏幕。在那次尝试中,我被困在打开 UIActionSheet 的这一点上,它工作正常并显示 iPhone 5 4 英寸屏幕上的所有按钮,但在 3.5 英寸设备上,最后一个按钮被切断。这表明 UIActionSheet 无法识别较小的屏幕。

这就是我在我的代码中所做的。有什么想法吗?

UIActionSheet *popupQuery;
// Code to initialize UIActionSheet

popupQuery.actionSheetStyle = UIActionSheetStyleBlackTranslucent;
[popupQuery showInView:[UIApplication sharedApplication].keyWindow];
[popupQuery release];



Best Answer-推荐答案


检查是否在 MainWindow.xib 中的窗口上选中了“启动时全屏”选项。

在为 iPhone 5 屏幕更新时,我遇到了类似的问题和其他问题。显然,Window 的“模拟指标”将是启动时的实际指标(前提是您没有选中“启动时全屏”)。

Apple 实际上在 UIWindow Class Reference 中有一个关于它的注释。 :

... If you choose to create a window in Interface Builder, be sure to select the Full Screen at Launch option in the Attributes inspector so that the window is sized appropriately for the current device. ...

关于iphone - UIActionSheet 高度在 3.5 英寸设备上为 4 英寸,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12651460/






欢迎光临 OGeek|极客世界-中国程序员成长平台 (http://sqlite.in/) Powered by Discuz! X3.4