Nic Hubbard
Nic Hubbard

Reputation: 42139

UITableViewCell ImageView too large on iPhone X

I am using a Storyboard and setting a UIImageView for my UITableViewCell. I have a @2x and @3x version of the image, at 50x50 and 100x100.

This looks how I want it to on an iPhone 6, 7, 8:

enter image description here

iPhone X:

enter image description here

As you can see the icon is much larger on the iPhone X. (I realize the screen is larger on the X, but the icons are obviously much larger).

Any ideas on how to fix this?

Upvotes: 2

Views: 213

Answers (1)

nathangitter
nathangitter

Reputation: 9777

I think the issue is the size of your image assets.

I have a @2x and @3x version of the image, at 50x50 and 100x100.

But @3x assets should have a width and height that is 1.5x larger than their @2x counterparts, not 2x larger. So if your 50x50 @2x assets are appearing correctly, your @3x assets should be 75x75, not 100x100.

Upvotes: 2

Related Questions