This question already has an answer here:
- UIView background sizing issue 7 answers
I want to set background image of my iPhone app. I've created 3 dimensions images
- 320 * 480
- 640 * 960
- 640 * 1136
But when i set background then whole image is not showing. I mean width of the image is showing perfectly but height is not showing. 90%
height is only showing in simulator and my iPhone.
I don't know what is the reason. I am new in iPhone. Please help me.
Thanks!
Shailesh
You need to allow for the status bar which is 20px. You could also turn off the status bar, but that is not recommended.
If you want the status bar to hidden, you need to set the
UIStatusBarHidden
property to true in your info.plist file.That takes care of the status bar when the app is launching. If you also want it invisible after launch, then you need to call the following code:
You forgot you have a status bar, witch has 20 px. Also, if you are using a UINavigationBar, this one its 44px . See Some Examples:
**only with statusBar (20 px)
size background:
**status bar + UINavigationBar (20px + 44 px)
size background:
you should check this link: size screen iPhone