问题
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?
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).
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.
回答1:
(e.g. the iPod player has square corners at the top; can't tell at the bottom)
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.
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).
来源:https://stackoverflow.com/questions/5518977/how-does-one-eliminate-the-rounded-corners-on-the-main-window-on-an-ipad-app