1

So, I have a .png image that is (640, 960) pixels in dimension. I'm trying to create a resizable image from the .png in order to stretch that image vertically and fit an iPhone 5's (640, 1096) pixel view.

I'm loading the image using +[UIImage imageNamed:], which is works fine. I then create a resizable image via -[UIImage resizableImageWithCapInsets:] using (480, 320, 479, 320) insets.

I then set the image to UIImageView. On an iPhone 4 & 4S it looks great (duh). On an iPhone 5, it appears to simply stretch the whole image vertically to 1096px, completely ignoring cap insets.

Patrick Perini
  • 22,555
  • 12
  • 59
  • 88

1 Answers1

1

Turns out, when you're using a (640, 960) pixel image, it needs to be an @2x.png.

Also, @bill-williams project was super helpful: https://github.com/asmallteapot/ImageStretchDemo

Patrick Perini
  • 22,555
  • 12
  • 59
  • 88