简体   繁体   English

Xamarin iOS 启动画面

[英]Xamarin iOS Splash Screen

Windows 10, Visual Studio 2019 (16.5.4). Windows 10,Visual Studio 2019 (16.5.4)。

I've been following this example:我一直在关注这个例子:

https://docs.microsoft.com/en-us/xamarin/ios/app-fundamentals/images-icons/launch-screens?tabs=windows https://docs.microsoft.com/en-us/xamarin/ios/app-fundamentals/images-icons/launch-screens?tabs=windows

Which is fairly straightforward.这很简单。 My splash screen is simply a blue background with my logo in the centre.我的初始屏幕只是一个蓝色背景,中间是我的徽标。 However, I cannot work out how to centralise the logo on every iOS device and both portrait and landscape.但是,我无法弄清楚如何将徽标集中在每个 iOS 设备以及纵向和横向设备上。

Do I have to create a different Asset or LaunchScreen.storyboard for every device?我是否必须为每台设备创建不同的资产或 LaunchScreen.storyboard?

在此处输入图像描述

The way I am familiar with that you can create a responsive design in iOS is to use the concept of AutoLayout .我熟悉的在 iOS 中创建响应式设计的方式是使用AutoLayout的概念。

But before you start that you should be aware of the basics of designing in iOS但在开始之前,您应该了解iOS 中的设计基础知识

Goodluck祝你好运

Feel free to get back if you have queries如果您有任何疑问,请随时回复

I cannot work out how to centralise the logo on every iOS device and both portrait and landscape.我无法弄清楚如何将徽标集中在每个 iOS 设备以及纵向和横向设备上。

In the designer you can grab the dot in the centre of the view and then drag it to the vertical or horizontal lines:在设计器中,您可以抓住视图中心的点,然后将其拖动到垂直或水平线:

在此处输入图像描述

在此处输入图像描述

Check https://docs.microsoft.com/en-us/xamarin/ios/user-interface/designer/designer-auto-layout#center-constraints检查https://docs.microsoft.com/en-us/xamarin/ios/user-interface/designer/designer-auto-layout#center-constraints

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM