I'm displaying a UIView with a UILabel on it and this view&label become blurry as soon as it gets to these lines code:
CATransform3D transform = CATransform3DIdentity;
transform.m34 = (1.0/-500);
view.layer.transform = transform;
Throughout the App I use CA3DRotations and other stuff and this never happened before. Also, I set the frame of the view and the label only using integers! So it's not a half-pixel problem or something like that, I know that that causes most blurry problems, but not mine!
On the simulator it's not blurry, iPad is not blurry, iPhone3GS is not blurry. Only on an iPhone4 with Retina display it becomes blurry. Even before I do any 3D rotations! Does anybody have a clue before I go insane?
Alright, I've found a solution. After using a hundred different lines of code using layer properties, such as layer gravity or magnification and tons of other solutions I suddenly stumbled by accident on the following 2 lines:
self.layer.shouldRasterize = TRUE;
self.layer.rasterizationScale = [[UIScreen mainScreen] scale];
This is the solution! For everyone in the future, is your view blurry on retina displays? Use this!