Background:
-
I have an iPhone application for which I want the launch image to be exactly the same as the background image for the main screen – so that upon loading the “launch image” is shown, then when the apps loads the main screen the background image will be the same, and perfectly line up so there is no change in background perceived
-
in the main screen viewDidLoad I load the same image into a UIImageView that takes up the entire window
Issue:
- what I get is there is a vertical offset, so there is a noticeable change during the transition
- it appears the issue main be in the vertical alignment for the launch image, in that it appears the top of the launch image starts higher than the bottom of that “carrier – time – battery” bar – it seems this launch image may be positioned for it’s tops to be from the top of this
- whereas the top of the background image for the main screen (once it loads) is from the bottom point of the “carrier – time – battery” bar
QUESTION: Why is there an offset? How best to fix this?
thanks
There is no need to use two different images for your start up image & background image.
Just set your background imageView’s
contentModetoUIViewContentModeBottomwill fix this problem.for example:
backgroundImageView.contentMode = UIViewContentModeBottom;