当在图层上设置shouldRasterize
到YES
时,我遇到问题。在iPad3上,label.text的文字从底部切下约1/5的大小。任何人都知道问题是什么?iPad 3 shouldRasterize = YES会使UILabel文字被切断
cellview.layer.cornerRadius = 12.0;
cellview.layer.borderColor = [UIColor blackColor].CGColor;
cellview.layer.borderWidth = 1.0;
cellview.layer.frame = rect;
cellview.layer.shouldRasterize =YES;
cellview.layer.masksToBounds = YES;
在iPad 2上,它工作正常。
真棒。非常感谢! – EmptyStack 2014-02-20 08:24:50
这解决了我的问题,文字看起来很模糊。 – theprojectabot 2015-01-18 19:37:35