I have an UIView subclass which is loaded in a UIViewController when needed. This view works fine in iPhone 3/4/5 or seems working fine. It also looks okay in iPad 1/2. But for iPad retina screen, the view is pixelated. All the labels, button, view background, texts are pixelated.
Earlier I did not override the drawRect method. But with some other SO hints I did that. But still did not solve the problem.
Any idea, where's the problem with retina display?
Ok, I figure out the problem.
The view uses a kinds nested view, and one of the view layer was manipulated and called the
layer.shouldRasterize = YES;
But if I add this line, that fixes the problem.
layer.rasterizationScale = [UIScreen mainScreen].scale;
In the apple WWDC 2012 they have a video on this. "Polishing Your Interface Rotations". Here they discussed the issue. https://developer.apple.com/videos/wwdc/2012/
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