objective-c - 迁移到 Assets 目录后 Storyboard不显示 Assets

标签 objective-c xcode storyboard asset-catalog

将图像资源迁移到 Assets 目录后,应用程序可以正确构建和运行,但 Assets 不会显示在 Xcode 的 Storyboard 中。

enter image description here

最佳答案

在我的例子中,这是因为我在 Storyboard 中使用了完整的 Assets 名称,包括文件扩展名(即“.png”)。

enter image description here

但是, Assets 的名称需要与 Assets 目录中图像集的名称相匹配:

enter image description here

因此,通过从 Storyboard 中的图像名称中删除“.png”,问题就解决了。

关于objective-c - 迁移到 Assets 目录后 Storyboard不显示 Assets ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19006001/

相关文章:

ios - 在 TabBarViewController 的选项卡之间传递数据

Swift 3 xcode storyboard,给 UIView 添加 box-shadow,就像 CSS 样式的 box-shadow

objective-c - UILocalNotification 立即触发,而不是在预定时间触发

asp.net - SignalR-ObjC 库的 SignalR 服务器错误 "The ConnectionId is in the incorrect format."

ios - 如何使用页面控件在 iOS 中开发部分

ios - 如何将 ScrollView 与动态高度的 subview 一起使用?

objective-c - 是否可以在运行时更改 Storyboard语言?

iphone - 强制隐藏键盘/resignFirstResponder

iphone - 使用 NSPredicate 获取核心数据对象的问题

ios - 半透明,setStatusBarStyle,UIWebView