iOS 9 changed the corner radius used for things like modal form sheets and action sheets. What is the new dimension, and what was the old from iOS 8 and previous?
My specific reason for asking is that I have a need to do a form sheet presentation on iPhone, so I'm doing my own custom modal transition animator. But I want to match the rounded corners of the system.
For iOS 8 the corner radius is 4.
For iOS 9 the corner radius is 12.
There will still be a slight difference since the native controls seem to use custom not-really-circular rounding, but 99.9% of the users won't notice the difference even in side-by-side comparison.
Just for clarifying, on iOS 10, iOS 11 and iOS 12 the corner radius is 13.
Apart from that, if you don't want to check what's the corner radius for every OS, you can access to the view that contains that corner radius (UIDropShadowView
) in the following way:
- (void) viewWillAppear:(BOOL)animated {
[super viewWillAppear:animated];
CGFloat cornerRadius = self.navigationController.superview.layer.cornerRadius;
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With