UIModalPresentationFormSheet With Square (0 Radius) Corners?

2k Views Asked by At

By default iPad modal form sheets get rounded corners. In a couple of Apple's apps, such as iTunes, the form sheets have perfectly square corners. Is there a relatively easy way to remove the corner radius that won't get me rejected from the App Store?

1

There are 1 best solutions below

2
On BEST ANSWER

Put this inside the view you are showing:

//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;
 }