peyton/MOOMaskedIconView

Blurriness on non-Retina devices

Closed this issue · 4 comments

Some rounder icons are way too blurry on non-Retina devices. Quartz's default antialiasing is all-or-nothing, and its strength when on is too strong. MOOMaskedIconView needs custom antialiasing for @1x.

Simulator
Simulator screenshot

iPhone 4
iPhone 4 screenshot downsized with Photoshop

Whoops, I thought I'd been doing icon.frame = CGRectIntegral(icon.frame) but wasn't. Looks fine now:

Blurriness fixed

Hey, it's on line 67 of Demo Project/ViewController.m.

If you're seeing the same issue I was, all you have to do is

icon.frame = CGRectIntegral(icon.frame)

When you try to center any view (eg a UILabel) with an odd width or height
to an integral point, the view will blur because its frame's origin will
have a terminating decimal of 0.5.

Sent from my iPhone

On Jun 22, 2012, at 7:30 PM, Jay Baird <
reply@reply.github.com>
wrote:

I'm actually seeing this in my app right now, the blurriness that is.

I've looked at the source of both branches and haven't been able to find
where you added the CGRectIntegral. I understand what CGRectIntegral does
but I am a bit baffled where to add it to the MOOMaskedIconView.

Thanks!


Reply to this email directly or view it on GitHub:
#2 (comment)

Yeah, I found it which is why I deleted the message. Didn't feel I needed to trouble you. Works great, thanks again.

Haha no prob, good luck

Sent from my iPhone

On Jun 23, 2012, at 5:18 PM, Jay Baird <
reply@reply.github.com>
wrote:

Yeah, I found it which is why I deleted the message. Didn't feel I needed
to trouble you. Works great, thanks again.


Reply to this email directly or view it on GitHub:
#2 (comment)