- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
在 viewDidLayoutSubView() 中,我尝试向我的 ScrollView 添加自定义 uibutton :
let roundedButton = RoundedShadowButton()
roundedButton.frame = CGRectMake(0, self.scrollView.frame.height, 60, 60)
roundedButton.setTitle("+", forState: .Normal)
roundedButton.tag = 1
self.scrollView.addSubview(roundedButton)
我收到以下错误:
2016-01-17 18:51:23.217 momentful[61122:2267703] CUICatalog: Invalid asset name supplied: 2016-01-17 18:51:23.218 momentful[61122:2267703] Could not load the "" image referenced from a nib in the bundle with identifier
为什么会发生这种情况?我怎样才能解决这个问题 ?提前致谢。
最佳答案
我认为您还必须将其作为 subview 添加到 View Controller 的 View 中:
self.view.addSubview(roundedButton)
现在一切都按预期进行。
关于ios - 在 ScrollView subview 中添加自定义 UIButton subview 会导致 CUICatalog : Invalid asset name supplied,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34845343/
运行我的代码时出现两个错误: CUICatalog: Invalid asset name supplied: 和 "Could not load the "" image referenced fr
下载 ODR Assets 包后出现错误: CoreUI: CUICatalog can't locate asset pack 'myprototype.asset-pack-000050KNKHU
突然之间,虽然我这边没有明显的变化,但我的 Assets 目录中的一张图片出现了以下错误: 2013-10-30 14:44:46.629 MyApp[38590:a0b] CUICatalog: C
我正在使用 xib 为我的一个应用制作 UI。我在控制台中收到多个与“CUICatalog:提供的 Assets 名称无效:(null)”相关的警告。从研究中我了解到,如果我们在 xib 中提供错误的
我有一个 UiVIewController,我在其中拖动了一个 TableView 并放置了所有需要的连接,如委托(delegate)和数据源,它工作正常,一切都很好。我试图为此 TableView
自从升级到 Xcode 7 以来,我们的 CI 系统中不断收到成千上万的此类日志。根本不知道它们可能意味着什么。 2015-09-16 13:44:36.286 Interface Builder C
TableViewApplication[1458:70b] CUICatalog: Invalid asset name supplied: (null), or invalid scale fac
我正在尝试播放本地视频文件并不断收到以下日志: [框架] CUICatalog:提供的 Assets 名称无效:'(null)' 我的视频文件在项目目录中,也在主包资源中。我已经尝试了多个版本的语法来
在 viewDidLayoutSubView() 中,我尝试向我的 ScrollView 添加自定义 uibutton : let roundedButton = RoundedShadowButto
我收到以下错误: CUICatalog: Invalid asset name supplied: (null), or invalid scale factor: 2.000000 Could no
我创建了在 xcode 5 上完美运行的应用程序。但是当我使用 iphone 6 模拟器在 xcode 6 上运行它时,它给了我一个错误: CUICatalog: Can't find renditi
我是一名优秀的程序员,十分优秀!