Search code examples
objective-ciosuiviewcgaffinetransform

UIView's transform looks terrible


I have a simple view with simple background. I need to rotate the view with it's content. The code is here:

    CGAffineTransform r = CGAffineTransformMakeRotation(5 * M_PI / 180.0f);
    backView.transform = r;

I can't find and way make it look nice.

Here is the screenshot:

enter image description here


Solution

  • You can use the key UIViewEdgeAntialiasing in info.plist:

    enter image description here

    But as the documentation says, this can have a noticeable impact on performance.