ios開發 :CUICatalog: Invalid asset name supplied: '(null)'

_iconImage.image = [UIImage imageNamed:sourceDic[@“image”]];

明明有圖片,但還是提示這個圖片名稱不存在
報錯

CUICatalog: Invalid asset name supplied: '(null)'

打斷點進去,顯示 _iconImage的值是 nil

添加斷點
在這裏插入圖片描述

定位到錯誤在109行

- (NSArray *)messageTableSource {
    if (_messageTableSource) {
        _messageTableSource = @[
                @{@"image": @"我的界面我的收藏圖標", @"title": @"我的收藏"},
                @{@"image": @"我的界面意見反饋圖標", @"title": @"意見反饋"},
                @{@"image": @"我的界面關於我們圖標", @"title": @"關於我們"},
                @{@"image": @"我的界面客服熱線圖標", @"title": @"客服熱線"},
                @{@"image": @"我的界面我的優惠券圖標", @"title": @"我的優惠券"},
                @{@"image": @"我的界面邀請好友圖標", @"title": @"邀請好友,立即賺錢"}
        ];
    }
    return _messageTableSource;
}

在這裏插入圖片描述
但這個圖片也是實際存在的,就重新賦值下名稱

最後少一個 感嘆號,運行正常,但是還是沒有顯示圖片,額,其他地方的 ! 也都沒加
在這裏插入圖片描述

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章