【问题标题】:In a Xamarin Forms application. What's a Styles.xcassets file in the iOS project used for?在 Xamarin Forms 应用程序中。 iOS 项目中的 Styles.xcassets 文件是做什么用的?
【发布时间】:2019-06-17 10:09:30
【问题描述】:

我的应用程序有这些文件之一,但它似乎没有做任何事情,当我单击它时,它显示为空。

【问题讨论】:

    标签: xamarin xamarin.forms


    【解决方案1】:

    这是一个资产目录图像集

    资产目录图像集 - 使用资产目录图像集来管理和 对应用所需的给定图像资源的所有版本进行分组。

    您可以使用资源或创建目录图像集将图像添加到您的 iOS 解决方案。

    您可以阅读official Apple Documentation

    【讨论】:

    • 这看起来像一个 Assets.xcassets 文件。我的问题是关于 Styles.xcassets 文件
    【解决方案2】:

    iOS 项目中没有名为Styles.xcassets 的默认文件。而且我认为这是某人创建的普通Asset Catalog Image Sets 文件。

    在 iOS 项目中,默认 Asset Catalog Image Sets 称为 Assets.xcassets 文件并在那里管理您的图像。

    此外,您可以创建更多 ....xcassets 来管理您的图像,而不是使用 Assets.xcassets。它可以更清晰,更容易区分不同类型的图像。

    例如,如果有Styles.xcassets,则可以将所有样式的图像放入此文件中。您还可以在那里创建一个Home.xcassets 以将所有图像放在homePage 那里。

    希望你现在就理解What's a Styles.xcassets file in the iOS project used for

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2020-12-11
      • 2018-12-02
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2022-10-18
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多