如何在今日扩展中显示资产目录中的图像?

编程入门 行业动态 更新时间:2024-10-23 20:22:47
本文介绍了如何在今日扩展中显示资产目录中的图像?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我正在开发iOS8的Today Extension。我的应用程序组设置正确,我可以成功使用NSUserDefaults将简单的数据位发送到我的扩展(使用本教程)。

I'm working on a Today Extension for iOS8. My App Group is set up correctly and I can successfully use NSUserDefaults to send simple bits of data to my extension (using this tutorial).

在我的扩展程序的故事板中,我已将图像放在故事板上并将图像设置为我的资产目录中的资产。即使它出现在Interface Builder中,当我在设备和模拟器上运行应用程序时,图像也不会显示。

In the storyboard for my extension, I've placed an image onto the storyboard and set the image to be an asset I have in my Asset Catalog. Even though it appears in Interface Builder, when I run the app on a device and simulator the image doesn't display.

我缺少什么?

推荐答案

确保资产目录包含在Today分机的目标中。

Make sure the asset catalog is included in the target for your Today extension.

更多推荐

如何在今日扩展中显示资产目录中的图像?

本文发布于:2023-11-02 08:23:16,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1551881.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:图像   资产   今日   如何在   目录中

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!