请求网络图片
UIButton * btn = [[UIButton alloc]init];
[btn setImageWithURL:[NSString stringWithFormat:@"http:xxx.png"]];
此时出现的问题是:-[_NSString absoluteURL]
[btn setImageWithURL:[USURL URLWithString:[NSString stringWIthFormat:@"hhtp:xxx.png"]]];
本文介绍了一个使用UIButton从网络加载图片的实例,展示了如何正确设置图片URL,并解决因字符串格式错误导致的问题。
1019

被折叠的 条评论
为什么被折叠?