I am working on an app and it has 3 storyboards - iPad, iPhone and iPhone 4. 3 different users (myself included) have had the experience where on their iPad - the splash screen that loads is small and in the top-left corner...leaving much white space to the right and bottom.
It is as if it is loading the iPhone size splash.
I have no launch screen file selected in the general tab of the project. I have also noticed that after restarting my iPad, it does seem to load the proper screen size. Any ideas as to what is going on?
Use this line of code for screen size.
CGRect screen_size = [[UIScreen mainScreen]bounds];
Related
Ok so my old apps which were written for the 3.5in and 4in iphone screens are downloaded on the and iphone with an 4.7/5.5in they seem to upscale and run perfectly fine with everything where it's suppose to be on the screen. So now I'm writing a new app just for the 4in screens because my thinking is that it will upscale when ran on 4.7/5.5in screen but this doesn't seem to be the case.
When I run my new app on a device with a 4.7/5.5in screen there is no upscaling. Why is this so? is there any setting to force the iphone to perform the upscaling or do I have to actually tune everything for 4.7/5.5in screens?
UPDATE:
Ok I figured it out. To get your apps designed for the 4in screen to zoom in/upscale to fit the 4.7/5.5in screens you have delete the LaunchScreen.storyboard file from your project and add the Default-568#2x file.
iOS apps detect the screen size using the launch screen. The made the OS zoom out the app in order to support older apps.
If you want to let the app take full usage of the screen resolution you should use a LaunScreen storyboard or provide the assets for all the screen sizes. If this assets are not found and you use the asset catalog for the splash screen you will get the zoom to fit larger screens
I am getting wrong screen size in iPhone 6 and 6+ by using
[UIScreen mainScreen].nativeBounds
and
[UIScreen mainScreen].bounds
In both case , i am getting wrong screen size.
So, I have added launch screen for iPhone 6 and iPhone 6+ then I get correct size of screen in iPhone 6 and iPhone 6+.
But another problem is that My App UI displaying wrong. All Screens of app left right padding. See below image :
If I remove launch screen for iPhone 6 and 6+ then App UI is displaying right as displaying before like below image :
In above image, no right padding.
I have also check by adding launch screen but that also getting wrong screen sizes.
Note : I have used AutoResize in app and It is working good in whole app.
I have also do so much googling to find out actual problem but unfortunately can't get it. Thanks so much in advance If anyone help to sort out that problem.
Sorry, did you check Settings -> Display and brightness -> View (Standart)?
One of the possible patch to identify your screen type is by getting the scale of your screen. You can use the following code : [UIScreen mainScreen].scale;
This will not let you know the exact screen size but will allow you to know what is the scaling. This method might be helpful where you need not to code individually for different screens and majorly do not want to convert your entire code to autolayout.
To know the scaling factor of different screens refer to following link : http://www.paintcodeapp.com/news/iphone-6-screens-demystified
Ok so I'm upgrading my iOS app to take advantage of the iPhone 6's larger display but iAd is still showing ads of the iPhone 5s dimensions (both on the banner and when you select the advert).
There's an annoying blank space either side of the banner, and a full frame of blank space around the view when the advert is selected.
My app has a correct iPhone 6 launch image and is showing native resolution (no scaling). Grateful if anyone can give me a pointer as to where I am going wrong.
The iAd frame is configured and sized with this code and placed at the bottom of the screen:
[_UIiAd setFrame:(CGRectMake(0, screenHeight - 100, screenWidth, 50))];
It looks like this:
It turns out that iAd is actually working fine, but Apple has not yet modified the dimensions of the test ad to suit the iPhone 6 and 6 Plus.
Update 25th Nov 2014 - Apple has now updated iAd banners to display the correct dimensions.
I have an iOS app that was working fine. Displaying fine, operating fine. When I uninstalled it and gave it a fresh install, about an half an inch on both the top and bottom of the screen is black. It appears to be thinking it's an older iPhone and trying to fit it into a smaller screen. I don't recall changing anything related to this. Any ideas what it might be?
You are testing this in iPhone5 (4 inch size device) than you are finding box layout (black margin top bottom ) hope i am assuming right than
please check your splash image from iPhone5 that is 640x1136 it is not load right now or it would be missing in your application.
add splash screen for 4 size device it will work.
If you are using image-assets for splash screen than add this image in R4
I am trying to test an app in the simulator (3.5 retina iPhone) and am running into a bit of an annoyance. I can't see the bottom 10th of the screen...
I have tried the Cmd+3 shortcut but unfortunately that part of the screen is still missing. For example, the card should be in the middle of the screen below:
For this app, I have some components at the bottom of the screen that I can't see in the simulator. For now, I'm having to move the components further up the screen so that I can test them but it isn't ideal.
Has anyone else encountered this issue?
I think you have designed your view for the 4 inch display, and have not set up autolayout/springs and struts to layout your view correctly.