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?
Asked
Active
Viewed 2,088 times
1 Answers
3
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;
}

Taylor Romero
- 56
- 5
-
3Setting this at viewWillAppear, rather than viewDidLoad, ensures that the you never see the default beveled corners. Otherwise, this works like a charm. Thanks. – Jul 14 '11 at 02:16
-
2Coming here from 2016: This code did not work for me, but self.view.superview.layer.cornerRadius = 0; did. Give that a shot if the above code doesn't work for you. – BreadicalMD Aug 11 '16 at 16:36