如何消除iPad应用程序主窗口上的圆角? [英] How does one eliminate the rounded corners on the main window on an iPad app?

查看:162
本文介绍了如何消除iPad应用程序主窗口上的圆角?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经看到一些iPad应用程序填满了屏幕(例如Stanza)或者已经在状态栏下方摆角(例如,iPod播放器顶部有方角;底部无法分辨)。有人知道这是怎么做的吗?

I have seen some iPad apps that fill the screen (e.g. Stanza) or have squared off corners under the status bar (e.g. the iPod player has square corners at the top; can't tell at the bottom). Anyone know how this is done?

默认情况下,顶级UIWindow似乎应用了剪裁区域,因为我放置在该窗口中的任何子视图都会被剪裁在那些角落里。如果是这样的话,有没有办法摆脱这个?顺便说一下,剪辑似乎只出现在iPad上,而不是我的iPod Touch上(至少不是我在那里运行的旧操作系统版本)。

It seems that, by default, the top-level UIWindow has a clipping region applied, as any subviews I place in that window get clipped off in those corners. If that is the case, is there a way to get rid of this? BTW, the clipping only seems to be there on the iPad, not on my iPod Touch (at least, not in the older OS version I'm running on there).

跟进:我甚至以编程方式创建了UIWindow,然后将其背景设置为纯色,圆角仍然存在,确认裁剪要么在UIWindow上,要么在更高的位置。

Following up: I even created the UIWindow programmatically and then set its background to a solid color and the rounded corners are still there, confirming that the clipping is either on the UIWindow or something even higher up.

推荐答案


(例如,iPod播放器顶部有方角;底部无法分辨)

(e.g. the iPod player has square corners at the top; can't tell at the bottom)

你需要习惯这一点:Apple应用程序会做你的应用程序无法做的事情。 Apple可以使用私有框架,App Store应用程序不会。

You'll need to get used to this: Apple apps will do things your apps can't do. Apple get to use private frameworks, App Store apps don't.

如果您不使用状态栏(即完全全屏),您将会得到一个'非圆形'屏幕。这很简单 - 只需在代码中隐藏状态栏(或者,如果您希望它隐藏在整个应用程序中,您只需在info.plist中设置它)。

If you don't use the status bar (ie, completely 'full screen') you'll get a 'non rounded' screen. This is pretty simple to do - just hide the status bar from within your code (or, if you want it hidden throughout your app, you can just set it in your info.plist).

这篇关于如何消除iPad应用程序主窗口上的圆角?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆