I have a UILabel; when I enlarge it using UIPinchGestureRecognizer, the text becomes blurred.


I use CGAffineTransformScale my code
self.myLabel.transform = CGAffineTransformScale(self.myLabel.transform, pinchRecognizer.scale, pinchRecognizer.scale);
How to fix it?
I found how to solve this problem, it was so easy.
give scale:
CGFloat scale = self.myLable.transform.a *pinchRecognizer.scale *[UIScreen mainScreen].scale;
this a - (self.myLable.transform.a) return current scale factor.
self.myLable.transform = CGAffineTransformScale(self.myLable.transform, pinchRecognizer.scale, pinchRecognizer.scale);
[self.myLable setContentScaleFactor:scale];
Done, happy coding!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With