iOS8.0 UILabel切圆角之后有时边缘会有一条黑线

xiaoxiao2021-02-28  131

如图所示

原因:frame的宽高没有取整 解决方法:在取frame得时候,加上CGRectIntegral,使得宽、高得到一个整数

原始给坐标: CGRectMake(Width - 10 * ScaleWidth - width, _timeLable.y, width, 16 * ScaleHeight) 修改后坐标: CGRectIntegral(CGRectMake(Width - 10 * ScaleWidth - width, _timeLable.y, width, 16 * ScaleHeight))

转载请注明原文地址: https://www.6miu.com/read-20132.html

最新回复(0)