1.有时图片名称是中文,图片显示不出来。需要转格式。
NSString *str;
str=[NSString stringWithFormat:@"%@/%@",kHostName,model.goodsImage];
str = [str stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding];
NSURL *url=[NSURL URLWithString:str];
[goodsImageView sd_setImageWithURL:url placeholderImage:[UIImage imageNamed:@"loadFailed.png"]];
2.根据一个字符来分割字符串
NSArray *imageArr=[imageStr componentsSeparatedByString:@";"];