timerLabel是我试图将其更改为圆圈的标签。此行代码未按我想要的方式工作:
timerLabel.layer.cornerRadius = timerLabel.frame.width/2
我在这个已经被问到的帖子中找到了我的问题的解决方案:https://stackoverflow.com/a/46066815/8451094 .谢谢@elarcoiris
lblRoundDot.layer.cornerRadius = lblRoundDot.frame.width/2
lblRoundDot.layer.masksToBounds = true