Reputation: 113
I have an UIImageView and I wanted to rotate it slightly in the anti-clock direction. But when I do that, rotation works. But the edges are not shared. Having a pixelated edges. How do I solve this issue. Please help.
UIImageView *popupTop = [[UIImageView alloc] initWithFrame:CGRectMake(10, 54, 300, 15)];
popupTop.image = [UIImage imageNamed:@"pover_note.png"];
[self.view addSubview:popupTop];
popupTop.transform = CGAffineTransformMakeRotation(-0.04);
Upvotes: 1
Views: 835
Reputation: 828
Add a key in info.plist Renders with edge antialisasing and set its value to YES
Upvotes: 3
Reputation: 38485
If you don't want a potential performance hit or possible other side effects of UIViewEdgeAntialiasing
then the easiest way is to make a border of transparent pixels around your image :)
Upvotes: 0
Reputation: 542
There is a key that you can set in Info.plist that enables antialiasing of the edges: UIViewEdgeAntialiasing
.
Upvotes: 0