UIlabel layer.cornerRadius not working in iOS 7.1

后端 未结 8 1915
时光说笑
时光说笑 2021-01-30 04:40

I\'m currently looking at a UILabel with the property addMessageLabel.layer.cornerRadius = 5.0f; On a device with iOS 7.0 installed, it has rounded corners. On a de

8条回答
  •  爱一瞬间的悲伤
    2021-01-30 05:31

    yourlabelname.layer.cornerRadius = yourlabelname.frame.size.width/2;
    [yourlabelname setClipsToBounds:YES];
    

    Make sure you are checking with appropriate Deployment target.

提交回复
热议问题