菜鸟教程小白 发表于 2022-12-12 22:56:08

iphone - UIActionSheet 高度在 3.5 英寸设备上为 4 英寸


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

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

<pre><code>UIActionSheet *popupQuery;
// Code to initialize UIActionSheet

popupQuery.actionSheetStyle = UIActionSheetStyleBlackTranslucent;
.keyWindow];
;
</code></pre></p>
                                    <br><hr><h1><strong>Best Answer-推荐答案</ strong></h1><br>
                                            <p><p>检查是否在 MainWindow.xib 中的窗口上选中了“启动时全屏”选项。</p>

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

<p>Apple 实际上在 <a href="http://developer.apple.com/library/ios/#documentation/uikit/reference/UIWindow_Class/UIWindowClassReference/UIWindowClassReference.html" rel="noreferrer noopener nofollow">UIWindow Class Reference</a> 中有一个关于它的注释。 :</p>

<blockquote>
<p>... 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. ...</p>
</blockquote></p>
                                   
                                                <p style="font-size: 20px;">关于iphone - UIActionSheet 高度在 3.5 英寸设备上为 4 英寸,我们在Stack Overflow上找到一个类似的问题:
                                                        <a href="https://stackoverflow.com/questions/12651460/" rel="noreferrer noopener nofollow" style="color: red;">
                                                                https://stackoverflow.com/questions/12651460/
                                                        </a>
                                                </p>
                                       
页: [1]
查看完整版本: iphone - UIActionSheet 高度在 3.5 英寸设备上为 4 英寸