判断字典为输出为null
程序员文章站
2022-07-15 12:25:04
...
if ([self.curriculum[@"name"] length] == 0) {
textLabel.text = @"去吧 皮卡丘";
}else{
textLabel.text = [NSString stringWithFormat:@"%@",self.curriculum[@"name"]];
}