UIScrollView 放大,导致UILabel字体模糊

问题描述:在UIScollview 上添加了UILabel,当放大的时候,UILabel上字体显示模糊
解决方法:

//缩放结束
-(void)scrollViewDidEndZooming:(UIScrollView *)scrollView withView:(UIView *)view atScale:(CGFloat)scale{
    NSLog(@"缩放的比例:%f",scale);
    //[scrollView setContentSize:CGSizeMake(scrollView.frame.size.width, (_mLabel.frame.origin.y+_mLabel.frame.size.height)*scale)];
    [_mLabel.layer setContentsScale:scale*[[UIScreen mainScreen] scale]];
    [_mLabel.layer setNeedsDisplay];
}

参考链接:(https://stackoverflow.com/questions/17608613/ios-adding-uilabel-to-zoomed-uiscrollview-was-blurred

你可能感兴趣的:(UIScrollView 放大,导致UILabel字体模糊)