Bri Bri
Bri Bri

Reputation: 2228

How do I disable rounded corners for the main view of my entire iPhone app?

When running my iPhone app, the app's entire UI has rounded corners (i.e. the area underneath the status bar). The UI is set up using a storyboard, which does not show the rounded corners. How do I turn off the rounded corners? I have tried the following in my AppDelegate's didFinishLoading method:

[self.window.layer setCornerRadius:0.0];

but it made no difference. Any ideas?

Upvotes: 9

Views: 1910

Answers (4)

user3441799
user3441799

Reputation:

Try to use this code.

self.window = [[[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]] autorelease];

It may remove corner radius.

Upvotes: 1

TheTwoNotes
TheTwoNotes

Reputation: 463

Programmatically, in the main view controller, on viewWillLoad(), maybe do something like:

viewController.view.layer.cornerRadius = 0;

Might work...hope so.

Upvotes: 0

Muhammad_Awaab
Muhammad_Awaab

Reputation: 1588

Try creating a Base View Controller with corners of your choice and inherit the remaining view controllers from the base. I think this might work.

Upvotes: 0

Domness
Domness

Reputation: 7605

This is something that is part of iOS itself. One way around it would be to create a full screen application and do it that way.

Upvotes: 0

Related Questions