Приложение iOS не заполняет экран iPhone
Я пишу приложение для iPhone, используя Xamarin. мой UIViewController
не заполняет весь экран, есть разрыв сверху и снизу. Вот скриншот с симулятора. Я изменил цветовую схему, чтобы сделать пробелы более очевидными
Дизайн экрана был сделан в XCode ниже скриншот настроек для UIViewController
в Xcode.
Что я делаю не так, почему View слишком маленький?
2 ответа
Поместите 4-дюймовое изображение экрана запуска в свой каталог активов или info.plist
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>
in my file.
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.