Reputation: 744
I am writing an iPhone app using Xamarin. My UIViewController
does not fill the entire screen, there is a gap above and below. Here is a screen shot from the simulator. I have changed the colour scheme to make the gaps more obvious
The screen design was done in Xcode below is a screen shot of the settings for the UIViewController
in Xcode.
What am I doing wrong, why is the View too small?
Upvotes: 14
Views: 7987
Reputation: 2446
I was having this issue when running my app on an iPhone 7. There was a black bar along the bottom.
I tried following the other answers but the iOS Launch Image
is marked as Depricated
in Xcode 12.5.1
What solved it for was to add the UILaunchScreen
key and empty <dict/>
to my Info.plist
file like this:
...
<plist·version="1.0">
<dict>
...
<key>UILaunchScreen</key>
<dict/>
...
</dict>
</plist>
If your using xcode to generate your project files this is probably not an issue, but my .xcodeproj
and Info.plist
are generated by the xcodegen
tool which did not add this key-value to my plist.
If your project does not have a info.plist
file, you need to go to targets->info and click on + icon to add the key and value (dictionary)
Upvotes: 4