请求图片错误
2016-03-31 13:47
169 查看
请求图片时容易出现此错误
UIButton *avatarButton = [UIButton buttonWithType:UIButtonTypeCustom];
[avatarButton setImageWithURL:[NSString stringWithFormat:@”http:xxx.png”]];//错误
[avatarButton setImageWithURL:[NSURL URLWithString:[NSString stringWithFormat:@”http:xxx.png”]]];//正确
UIButton *avatarButton = [UIButton buttonWithType:UIButtonTypeCustom];
[avatarButton setImageWithURL:[NSString stringWithFormat:@”http:xxx.png”]];//错误
[avatarButton setImageWithURL:[NSURL URLWithString:[NSString stringWithFormat:@”http:xxx.png”]]];//正确
相关文章推荐
- 多线程编程-互斥锁
- 高效编程之互斥锁和自旋锁的一些知识
- 奇妙的三子棋之旅
- spring+mybatis时会出现Cannot load JDBC driver class ${jdbc.driverClassName}'
- BUTTON标签和INPUT标签的区别【转】
- 进程的描述和进程的创建
- java override
- iOS 获取视频第一帧图片
- 安卓LayoutInflater.inflate用法
- 1009-J
- sql 查询所有数据库、表名、表字段总结
- mysql-cluster安装和部署
- Loading models using libGDX
- 自旋锁和互斥锁区别
- 数据库中MyISAM与InnoDB区别
- centos安装redis3为系统服务
- 5.Transact-SQL编程
- Android 获取 AudioRecord 麦克风音量大小并做选择性发送
- 判断当前时间是否在一天的某个时间段内
- nodejs解决通过npm无法安装forever的方法