Search code examples
ios7

Rounded corners on global view


What would be the best way to put rounded corners on entire iOS app? I know how to do it on individual views using setCornerRadius. Can I apply this to a global view or something? Thanks :)

rounded corners


Solution

  • If you mean round the corners on the whole interface: Mask the window or root view with a rounded-corner mask.

    If you mean automatically round all corners of all views: No, there's no magic formula. Just keep doing what you're doing. You could make a generic rounded-corner view and subclass that, but that won't encompass views that are not subclasses of it, obviously.