请求图片错误

来源:互联网 发布:淘宝红包雨是怎么回事 编辑:程序博客网 时间:2024/05/21 17:10

请求图片时容易出现此错误
UIButton *avatarButton = [UIButton buttonWithType:UIButtonTypeCustom];
[avatarButton setImageWithURL:[NSString stringWithFormat:@”http:xxx.png”]];//错误
[avatarButton setImageWithURL:[NSURL URLWithString:[NSString stringWithFormat:@”http:xxx.png”]]];//正确

0 0
原创粉丝点击