scientiffic
scientiffic

Reputation: 9415

UIBarButtonItem image appears pixelated

In my IOS app, I'm trying to incorporate images on UIBarButtonItems. I found some icons on IconFinder, but they appear pixelated when I specify the image using the Storyboard (I exported 22x22 pixel pngs).

It appears fine in the storyboard but pixelated on my device / in the simulator:

enter image description here

enter image description here

How can you ensure that UIBarButtonItem images are not pixelated? I've read that they should be 22x22.

Upvotes: 1

Views: 377

Answers (1)

Ben Kane
Ben Kane

Reputation: 10030

They should be 22 x 22 points. You are dealing with pixels.

You need an @2x image that is 44 x 44 as well as an @3x image that's 66 x 66 if you're optimizing for iPhone 6 Plus.

Here's a helpful link about the difference between points and pixels

Upvotes: 3

Related Questions