6

默认情况下,iPad 模态表单具有圆角。在一些 Apple 的应用程序中,例如 iTunes,表单具有完美的方角。有没有一种相对简单的方法可以删除不会让我被 App Store 拒绝的圆角半径?

4

1 回答 1

3

把它放在你正在显示的视图中:

//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;
 }
于 2011-07-13T02:59:04.517 回答