Search code examples
iosstoryboarduilabelios17

UILabel View with rounded corner radius does not work on iOS 17 Beta - Xcode 15 Beta


I am using a UILabel view and I have set the corner radius of it so as to make it rounded using runtime attributes. enter image description here

This is how it appears on iOS 16.x or below (any iOS 16 or below). enter image description here

and this is how it looks on iOS 17 Beta. enter image description here

The dot appears like a square. no idea how to fix this.

Tested on multiple devices and the square issue only appears on iOS 17 Beta.


Solution

  • Put this after creating the corner radius:

    label.layer.masksToBounds = true