如何调试CUICatalog:提供的资产名称无效:(空) [英] How to debug CUICatalog: Invalid asset name supplied: (null)

查看:41
本文介绍了如何调试CUICatalog:提供的资产名称无效:(空)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用xib制作我的一个应用程序的UI.我在控制台中收到与"CUICatalog:提供的无效资产名称:(空)"相关的几个警告.从研究中我知道,如果我们在xib中提供了错误的图像名称,则会发生此错误.但是在这里我想知道是否有任何方法可以指出引发错误,XIB名称或错误图像名称等的位置.

I am using xib to make UI of one of my apps. I am getting several warnings in console related to "CUICatalog: Invalid asset name supplied: (null)". From research I got to know that if we supply wrong image name in xib this error occurs. But here I want to know if there is any way to point the place from where its throwing that error, xib name or wrong image name etc.

推荐答案

我刚刚修复了此错误.只需检查函数[UIImage imageNamed:(NSString *)imageName]的用法即可.如果imageName为nil,则会发生错误.

I have just fixed this error. Just Check the usage of function [UIImage imageNamed:(NSString*) imageName]. If the imageName is nil, then error happens.

在我的代码中:

UIImageView*imageView=[[UIImageView alloc]initWithFrame:frame];

    if (imageName!=nil) {
        imageView.image=[UIImage imageNamed:imageName];
    }

这篇关于如何调试CUICatalog:提供的资产名称无效:(空)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆