【问题标题】:how to set image as background in launch.storybord + xamarin.forms如何在launch.storyboard + xamarin.forms中将图像设置为背景
【发布时间】:2018-05-22 12:33:25
【问题描述】:

最近发布的 xamarin 启动屏幕可以从情节提要设计,而不是我们根据 wise 添加所有初始屏幕图像的旧方法。

https://developer.xamarin.com/guides/ios/application_fundamentals/working_with_images/launch-screens/

从此链接了解如何使用情节提要设置启动屏幕。

所以我的问题是如何将图像设置为情节提要的背景不想要背景颜色。

我需要图像作为背景,我可以在上面放置徽标图像和标签。

那么有可能吗?如果可以,那么如何。

请帮忙。

【问题讨论】:

  • 添加一个 UIImageView 作为子视图,它首先填充屏幕。
  • 我在 UIImageView 之类的工具箱中看不到这样的控件:(
  • 哦,在 VS 中它命名为 Image View
  • 是的。我试过了。我在 storybord 上控制了 imageview
  • 我在这里做错了什么??

标签: ios xamarin.forms splash-screen


【解决方案1】:

您需要在 imageView 上设置top,bottom,leading,trailing 约束。

  1. 选择Constraint edit mode,点击两下,显示一侧的点,可以拖动设置约束。

  2. 将约束值修改为 0(在属性菜单中)。

  3. 对四个约束做同样的工作。

参考Auto Layout with the Xamarin Designer for iOS

【讨论】:

猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 2014-06-23
  • 1970-01-01
  • 1970-01-01
  • 2016-10-03
  • 2021-07-29
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多