Reputation: 4484
I have an iOS App originally developed for iPhone 4 and 5.
After doing some updates, I tried to run it on iPhone 7 (Simulator), the Views won't fill the screen any more. They (inclusing the title bar) leave a black margin on the right and the bottom of the screen.
I found a lot of similar posts regarding iPhone 5, where an appropriate launch image was missing. Yet, I have included all possible launch images in their correct sizes as asset catalogue (shows no warnings any more, puh), and the when the app is launched, the launch image is fullscreen.
The Layout/View is set to auto-layout, and resized well, if I change the size in the InterfaceBuilder.
Why does the View not scale on iPhone 7 ?!?
Upvotes: 1
Views: 1648
Reputation: 4484
Found Solution
In the View's "Attributes inspector" tab, in category "Simulated metrics", the attribute "Size" was set to "Freeform". After changing this to "Inferred", the sizing worked.
Note, that this seeting shall be checked in the MainWindow, as well. And it may require a build-clean, before this change reaches the Simulator.
Changing the "Size" also influenced the device selector in the InterfaceBuilder (the symbols for different iPhone and iPad models), making it actually adjust the size when clicking an iPhone model or changing orientation... Before, nothing had changed when clicking a model from the selector.
Upvotes: 1
Reputation: 8322
yes that was also working but in this question launchscreen are mentioned so i have gives answer according to that point.
Upvotes: 0
Reputation: 8322
Try to add splash screen image to project with following name instead of assets folder.
Default-568h.png 320 x 568
[email protected] 640 x 1136
[email protected] 750 x 1334
[email protected] 1242 x 2208
Default.png 320 x 480
[email protected] 640 x 960
Upvotes: 1