Ios4 UIModalPresentationFormSheet是否具有方形(0半径)角?

Ios4 UIModalPresentationFormSheet是否具有方形(0半径)角?,ios4,uimodalpresentationformsh,Ios4,Uimodalpresentationformsh,默认情况下,iPad模式表单将获得圆角。在一些苹果的应用程序中,比如iTunes,表单有着完美的直角。是否有一种相对简单的方法可以删除角半径,而不会让我被应用商店拒绝?将其放在您正在显示的视图中: //You will have to link to the QuartzCore library #import <QuartzCore/QuartzCore.h> - (void)viewDidLoad { [super viewDidLoad]; //set bo

默认情况下,iPad模式表单将获得圆角。在一些苹果的应用程序中,比如iTunes,表单有着完美的直角。是否有一种相对简单的方法可以删除角半径,而不会让我被应用商店拒绝?

将其放在您正在显示的视图中:

//You will have to link to the QuartzCore library
#import <QuartzCore/QuartzCore.h>

- (void)viewDidLoad
{
    [super viewDidLoad]; 
    //set border radius on initial load
    self.view.layer.cornerRadius = 0;
}

- (void) didRotateFromInterfaceOrientation:(UIInterfaceOrientation)fromInterfaceOrientation {
     //for some reason the cornerRadius resets itself on orientation change
    self.view.layer.cornerRadius = 0;
 }
//您必须链接到QuartzCore库
#进口
-(无效)viewDidLoad
{
[超级视图下载];
//设置初始载荷的边界半径
self.view.layer.cornerRadius=0;
}
-(无效)didRotateFromInterfaceOrientation:(UIInterfaceOrientation)fromInterfaceOrientation{
//由于某些原因,转角半径会在方向改变时自行重置
self.view.layer.cornerRadius=0;
}

在ViewWillDisplay而不是viewDidLoad中设置此选项可确保您永远看不到默认的斜角。否则,这就像一个符咒。谢谢。从2016年开始来到这里:此代码不适用于我,但self.view.superview.layer.cornerRadius=0;做如果上面的代码不适合你,那就试试吧。