美文网首页
解决Label在Simulator的debug Color Bl

解决Label在Simulator的debug Color Bl

作者: winlee | 来源:发表于2017-01-09 16:34 被阅读86次

    未修改前显示红色, 表示layer层需要优化

    Simulator Screen Shot 2017年1月9日 16.27.48.png

    修改Label的layer

    self.detailTextLabel.layer.masksToBounds = YES;
    // 下面这两个是做离层渲染用的, 当视图显示的为动态内容时使用
    // self.detailTextLabel.layer.shouldRasterize = YES;
    // self.detailTextLabel.layer.rasterizationScale = [UIScreen mainScreen].scale;
    

    修改后显示绿色, 表示layer层已经优化好了

    Simulator Screen Shot 2017年1月9日 16.33.47.png

    相关文章

      网友评论

          本文标题:解决Label在Simulator的debug Color Bl

          本文链接:https://www.haomeiwen.com/subject/tedhbttx.html