CALayer.continuousCorners should be made public API to allow all apps to use platform-standard superlliptical corners on arbitrary views

Originator:desk
Number:rdar://44420870 Date Originated:September 13, 2018
Status:Open Resolved:
Product:iOS SDK • Core Animation Product Version:All
Classification:Suggestion Reproducible:Always
 
What began with just app icons in iOS 7 has now found its way to the entire display with iPhone X, iPhone Xs, and iPhone Xs Max: the use of "squircles" — superellipses — for rounded corners. Gone are the days when a simple corner radius was the only rounded corner shape found on Apple platforms.

At this time, the only public API that allows third party developers to round the corners of arbitrary interface elements on Apple platforms is the `cornerRadius` property on CALayer. This property alone does not replicate the superelljpse shape that is fast becoming a platform standard. In order to achieve such a shape, the developer can only hack a solution together using image-based masking with pre-rendered images whose alpha values depict a superellipse boundary. 

There is, however, a private API on CALayer, another property called `continuousCorners` which, when set to `true`, will cause the layer to render it's corner radius using a platform default superelliptical path. This property should be made public so that third party apps can adhere more closely to platform design motifs without being limited to bitmap-based techniques.

[a sample project was attached]

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!