Question

I've been trying to set the launch image and the background image of the first view to be a seamless transition. When I set the target build to iOS 7, no problem at all... perfect transition using the asset catalog images. However, when I set the build target to iOS 6.0 or 6.1, the 4" screen views push the background image up while the 3.5" is fine.

I've done just about all I can think of. I'm setting the background image programatically using:

[self.view setBackgroundColor:[UIColor colorWithPatternImage:[UIImage imageNamed:@"Background"]]];

I've tried various autosizing settings within IB to adjust the view but nothing has worked so far. As I said, if I set the target build to iOS 7, it looks fine, but not when setting it to iOS 6/6.1.

I read somewhere that if you set the build to iOS 6 that the -h568@2x images are never used (even if running on an iOS 7 device), and from what I've found that is true. If I adjust the .png in photoshop to offset the difference of the Background-h568@2x image, that change doesn't show. If I do the same to Background@2x, that change shows up on the 4" retina displays as well.

I'm so confused. Is there a way to make sure the 4" retina displays are using the correct background images while still targeting iOS 6?

Thanks in advance and if I'm not clear anywhere, feel free to ask.

EDIT: And no, I'd rather not be supporting iOS 6 but I don't have a choice in it. :/

Was it helpful?

Solution

Okay, I've solved it. I assumed it would be some type of programmatic solution but I got it working another way.

The biggest issue was the fact that Background-h568@2x.png was never being used. Both the 3.5" screens and the 4" screens were using Background@2x.png. So altering that image file wasn't working. HOWEVER, for the longest time I didn't bother checking to see if Default-h586@2x was being used. After finally checking, it was, so I ended up editing the LaunchImage to match the background, and not the other way around. I feel silly. However, the fact the the 4" retina display images aren't being used from the asset catalog is really frustrating.

I've made the transitions seamless but I had to sacrifice the logo being centered vertically to fix it. On the 4" displays the logo is higher than I'd like to offset where the background image is being pushed to. Gah. The problem is solved, just not quite as I'd hoped.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top