iphone application splash image looks blurry on (iPhone 4) device - iphone

I have an Default#2x PNG image (640x920) for splash screen of our iPhone app. For some reason, it looks blurry on the device (iPhone 4) where the app is deployed, but instead on emulator it looks just fine. We are using XCode 4.2 for development. Any reasons why that's happening? And also, we assume that the image size of 640x920 should be fine (to not including the status bar - 40px in high res), correct?

Try to clean the build - an old Default.png may be used instead of the newer one. If that doesn't work, it might help to see the image used.
Also, as #barley said, check that the file name is Default#2x.png, as it is case-sensitive.
The size of Default.png and Default#2x.png should be 320x480 and 640x960, the entire screen. This is probably because Apple allows apps to remove the status-bar at startup, but can also have resizing-effects (not sure about that).

Make sure that the file name matches exactly Default#2x.png including the case. The device is case sensitive although the simulator is not.
The math of the resolution seems correct, but since the doc says 640x960, it is also a suspicious point.

Related

Strange issue with non retina display in iphone

My app was working fine both in simulator and iPhone 4 when i had only "image.png" . When I added "image#2x.png" screen's UI became distorted in actual device,simulator has no issues. Device is iphone 4 non-retina.
Do I need to specify anything when #2x images are added?
Just to confirm, you're not using a prerelease of Xcode 5, are you? If so, no one here is allowed to help you, and you should march yourself over to the Apple Developer forums.
That is strange. You shouldn't need to do anything other than creating the #2x version. Double and triple check that the files look as expected, and that the 2x version is exactly double the resolution in each direction (that is: if the original is 50x50, the 2x must be 100x100).
Next, try doing Product->Clean, delete the app from the device and then run it again. Sometimes weird things are solved that way. Also, restarting Xcode can't hurt, I've had that resolve more than a few Really Weird Issues.

Displaying wrong height in 4-inch iPhone simulator

I'm using Xcode 4.6.3 and my storyboard looks like this ,
When I run the app in any other hardware configuration (All sizes, iPhones and iPads) it works perfectly except the 4-inch retina. It cuts off at the top and at the bottom.
When i press home on the simulator the home-screen and the rest looks normal
I'm completely baffled by what can cause this and i don't have an actual device with that size to test on.
Anyone with this problem in xcode 5 (with your Default-568h#2x.png already included) may want to try creating an Asset collection - it fixed it for me (it also fixed a problem I had of icons and launch images not updating in the simulator)!

Loading different images for iPhone and iPad

I have read this post: How to support both iPad and iPhone retina graphics in universal apps and know that all I need to place ~ipad at the back of the name of the image to have it read properly. I have done this.
The problem is that the image appears correctly in the simulator. I can see that it reading the correct image from the size. But same image is appears as the iPhone Version in the device. Not sure why this is happening.
Need some guidance on this...
Every time I've had the proper image in the simulator, and image not showing up on the device, its been the same thing: UpperCase lowerCase mismatch on the name. i.e. You are asking for myPicture of type png, and your file is named MyPicture.png.
The simulator doesn't mind the case difference, but the device won't recognize the improper name.

iPhone 4 apps automatically scale up on iPad?

I thought I read/saw/heard something saying that apps built for iPhone 4's Retina Display would automatically run at 640x960 when installed on an iPad. However, can't find any documentation on that specific feature, and my app still runs at 320x480 when installed on an iPad.
Is there a step I've missed to make this happen? Or did I just imagine this being a feature?
Apps do not auto-upscale, BUT if you have an image larger than the UIImageView you are placing it in, you will get as large a version as the iPad can draw.
I don't think it knows to pull in #2x images, just ones that are actually larger than the space you are placing them into.
This is not the case; currently, apps won't auto-upscale on an iPad. Perhaps Apple will add this in iOS 4.x for iPad, but certainly there's been no indication from them that they will.

iPhone Splash: "Default.png" displays on simulator but not the iPhone

I'm trying to give my iPhone a splash screen.
I've placed Default.png in my resources group. When I run the simulator it is displayed as expected, however when I install my application to the iPhone, no splash screen is displayed.
Does anyone know what the cause/solution to this problem is?
Thanks!
If Default.png is not showing up in device, but simulator... then try the following.
Be sure you delete any "default.png", "Default.png", "Default.PNG", etc. that you might have created in several wrong attemps from within XCode and in Finder.
Delete the App on your iPhone/iPod/iPad
In Xcode Build->Clean All Targets
In Finder go to your project and locate the build folder, delete all folders in there.
Create a new Default.png like in the following example:
Connect iPhone/iPod to Mac.
Start your App on iPhone
In XCode launch Organizer (Window->Organizer)
Select your connected Device
You should see a tab "Screenshots"
Push the Capture Button, to make a Screenshot of your App
Push "As Default Image..." Button (This will create the Default.png and add it to your project, so that's a really handy thing)
Build and Run again. It should work now
Problems can occur due to wrong format (should be 320 width and 480 height (yes, that means you can see the status bar in your default.png)) or because you might have named the first file default.png (WHICH IS WRONG), which worked in simulator because it seems to be case insensitive but then when it gets copied to iPhone, it won't be found, cause it is case sensitive. So it will still be there in build folder (i think) causing a next correctly named Default.png not to override the old default.png in this iPhone build folder and so it might seem, that you can't fix the problem (cause you see Default.png in project, but in build it's still default.png).
At least this is my understanding now (afterwards), since for me it simply didn't want to work even though I tried again and again with different solutions from other people.
So from my point of view this different file handling (case/not case sensitive) is a mess that you can solve, by simply cleaning all and everything and trying to generate a new Default.png with the organizer (after everything was cleaned).
If you want a different/modified splash screen. Open the generated Default.png with photoshop/gimp/whatever and edit it.
Make sure your image is 480x320 pixels, and placed in your application at the top level. The frameworks will display this image until your initial view has loaded and is ready for display.
If you are seeing a black background then there is something amiss, however if you are just seeing your app's initial view then be happy you have managed to launch your app and have it ready for use in good time.
If you really, really want the user to to see your splash screen then slow down your launch by adding a delay into your app before you present the initial view
The file name must be Default.png (with a capital D). Also, do a clean/rebuild of the entire project to ensure the most recent version of the file is being included in the project. Check the filename on the filesystem, it may display differently in XCode.
Make sure that is is added into the bundle. To do this, select the image in the XCode left navigation panel, get info on the file, and make sure the checkbox for your target is enabled. Also make sure the file is really a png and not just named that way.
Just check the spelling ... I think u r using "default.png" instead of "Default.png". just make "d" capital "D" of Default.png .
Another possible issue that is Default.png is actually Default.jpg that was renamed to .png.
This will work fine on the simulator, but won't work on the device.
If you are using an iphone 4 you also need to add a
Default#2x.png with the size 640*960 px.
That's what fixed it for me.
This naming convention applies to all images in your app btw.
I had a similar problem, but my images were being displayed as gray or gray bars. It turned out that there was an alpha channel on the PNG images that the simulator was having no problem with, but the iphone wouldn't display. I opened the images in preview on my Mac and re-saved them without the alpha channel and everything worked. Don't know if this is your problem, but it might be worth a try.
I know this is old, but I'm having the exact same issue. The image doesn't show on the device, but is fine on the simulator. I noticed a lot of really weird things with my project, like there were 3-4 "Default.png" images in my plist and that there were a few other "Default.png" images in different libraries and stuff that I didn't notice.
I tried everything to get them to show up, but after creating a new project and setting the launch images to the EXACT same images I was trying to use, they worked fine. The only thing I can think is that somewhere the project gets corrupted and won't figure out what those launch images do.
Had the same problem caused by saving the initial file as default.png, so it should be Default.png (normal) and Default#2x.png (retina) images.
Go to your projects plist and add a row "Launch image" - use a different file name. Save your images with this name (and add #2x.png for retina). Should be fine afterwards.
Also, if you've already install the app on device, delete the app from device (as previous installation may not affect the changes).