UIlabel layer.cornerRadius无法在iOS 7.1中运行 [英] UIlabel layer.cornerRadius not working in iOS 7.1
本文介绍了UIlabel layer.cornerRadius无法在iOS 7.1中运行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我目前寻找一个UILabel与属性 addMessageLabel.layer.cornerRadius = 5.0F;
在安装了的iOS 7.0的装置,它具有圆角。在安装了iOS 7.1的设备上,它没有圆角。
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 device with iOS 7.1 installed, it does not have rounded corners.
这只是iOS 7.1的错误吗?
Is this just a bug with iOS 7.1?
推荐答案
将属性 clipsToBounds
设置为true
Set the property clipsToBounds
to true
addMessageLabel.clipsToBounds = true
这篇关于UIlabel layer.cornerRadius无法在iOS 7.1中运行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文