2

我目前正在更新我的应用程序以支持 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];
4

1 回答 1

4

Check that the option 'Full Screen at Launch' is checked on the Window in you MainWindow.xib.

I had a similar problem and others when updating for iPhone 5 screen. Apparently the 'Simulated metrics' of Window will be the actual metrics when launching (provided you have not checked 'Full Screen at Launch').

Apple actually has a Note about it in the 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. ...

于 2012-10-03T14:51:50.260 回答