ios - 加载图像不是从 .xcassets 文件夹?

标签 ios image uiimageview storyboard xcasset

我有一个本地化的 iOS 应用程序。我本地化了我的图像并将它们设置为来自代码的 View 。我从 .xcassets 中删除了本地化图像,现在这些图像位于某个文件夹“localized_images”中。但是现在 Storyboard 中的一些观点是空的。我如何在 Storyboard中为 imageview 设置图像而不是来自 .xcasset 文件夹,而是来 self 的文件夹“localized_images”

最佳答案

只需在属性检查器中输入图像名称及其扩展名(exampleImage.png)

此外,如果您想要 1x 2x 3x 图像,则必须创建 Assets 目录

enter image description here

关于ios - 加载图像不是从 .xcassets 文件夹?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43889103/

相关文章:

C++ 创建图像

image - 使用 ImageMagick 在图像中查找形状

ios - 更改 UISwitch 边框厚度?

ios - 模仿 UIAlertController 展示动画

ios - 如何在 iOS 11 的 UITextfield 中启用拖动

C# - 图像作为可点击的按钮

ios - 如何从iOS中旋转,缩放和倒置的UIImageView中提取UIImage

ios - .animationImages API Cocos 2D?

xcode - 我应该将 UIIMageViews 直接放在 Controller 的 View 中吗?

iphone - 日志调试 Objective-C 代码时使用哪些日志记录解决方案?