views:

97

answers:

3

I've had this app on app store with no problem until iphone 4 came out. My home page has an image covering the whole screen.

UIImageView added in interface builder, and image path added in interface builder.

In all phones this image shows up; however, the image does not show up in any iphone 4, and instead the user sees a blank screen like the following: Anybody knows what's causing this? thanks

store

.

  • I only have 1 set of images with normal resolution

  • This problem only happens to one of the images in my application which is the background for my home page

  • the graphic file should not be corrupted because the exact same image works for all other iphones and itouches
  • my image is a jpg file
  • image size is 480x270, which in interface builder i make it 563x330 to display only a part of it
  • I have no outlet to this uiimageview so it cannot be changed in code
+3  A: 

With devices with the new retina display, pixel sizes are different and you have to check for the following, in particular:

  • Do you provide two alternatives of the image, one at old resolution, one at double resolution (named myimage.png and [email protected])
  • If not, does your image scale up well in size with CoreGraphics's algorithms (there are some pathological cases, though you'd have to be quite unlucky)?
  • Have you checked what happens (at both resolutions) when your UIImageView size changes?
  • Is it just one image, or all?
  • Is your graphics file corrupted?

It's hard to tell if it's any of these points, or something else, because you provide so damn little detail, that I stick to generic things. Comment below (or edit your question) if you need more help.

FX
thanks , i updated the question
aryaxt
+1  A: 

I've got two things to add to FXs thorough answer:

  1. Considering the information you added, I would take a look at your code for setting up that UIImageView. Perhaps you use some sort of detection code or something which wasn't implemented correctly.

    Would you mind sharing some code snippets?

  2. According to Apple's documentation, you don't need to provide the ".png" extension as of iOS 4. Perhaps that is causing the problem.

    Again, code snippets would help here. Specifically where you deal with loading up your image file.

EDIT:

Try re-saving the image and replacing it. I've occasionally corrupted files in Photoshop. This has to do with file extensions and how Mac OS ignores them, but Photoshop still uses them.

Also, it could have to do with where the image is in your XCode project. Check what Group it is in. Make sure everything is in place and then Clean and Rebuild. Remove the app from the iPhone4 (reboot) and try reinstalling.

I hope this helps.

Good luck!

Moshe
there is nothing in code that can chaneg my image, there is no outlet for this uiimageview
aryaxt
Ok, then it may have to do with the image files itself. See my edit.
Moshe