Created
December 21, 2015 16:00
-
-
Save MaximAlien/5b0ec215afaf434024cb to your computer and use it in GitHub Desktop.
[iOS] Change corner radius and size of the UIViewController presented modally
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// For UIViewController inside UINavigationController | |
- (void)viewWillLayoutSubviews | |
{ | |
[super viewWillLayoutSubviews]; | |
self.navigationController.view.superview.bounds = CGRectMake(0, 0, 300, 300); | |
self.navigationController.view.superview.layer.cornerRadius = 2.0f; | |
} | |
// Usual presentation | |
- (void)viewWillLayoutSubviews | |
{ | |
[super viewWillLayoutSubviews]; | |
self.view.superview.bounds = CGRectMake(0, 0, 300, 300); | |
self.view.superview.layer.cornerRadius = 2.0f; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment