未修改前顯示紅色, 表示layer層需要優(yōu)化

Simulator Screen Shot 2017年1月9日 16.27.48.png
修改Label的layer
self.detailTextLabel.layer.masksToBounds = YES;
// 下面這兩個是做離層渲染用的, 當(dāng)視圖顯示的為動態(tài)內(nèi)容時使用
// self.detailTextLabel.layer.shouldRasterize = YES;
// self.detailTextLabel.layer.rasterizationScale = [UIScreen mainScreen].scale;
修改后顯示綠色, 表示layer層已經(jīng)優(yōu)化好了

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