問題:終端輸出連續多行如下提示,雖不影響功能但使得終端輸出信息多余不清爽影響調試找信息的速度
[framework] CUICatalog: Invalid asset name supplied: ''
[framework] CUICatalog: Invalid asset name supplied: '(null)'
原因:[UIImage imageNamed:@""] 或者 [UIImage imageNamed:nil]造成
解決辦法:設置符號斷點如圖
符號斷點
測試代碼
@interface ViewController ()
@property (nonatomic, strong) UIImageView *backImageView;
@end
@implementation ViewController
- (void)viewDidLoad {
[super viewDidLoad];
[self setupUI];
}
- (void)setupUI {
self.backImageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:nil]];
// self.backImageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@""]];
}
@end
結論:運行如圖,找到問題源修改
斷點堆棧