如果URL中带空格,在浏览器中可以显示,但是如果访问比如
UIImage 获取图片的时候就会出现BAD URL.
解决:
NSString* urlText = @"70.84.58.40/projects/igolf/TipThumb/GOLF 58B.jpg"; NSString* urlTextEscaped = [urlText stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding];
posted on 2013-12-24 12:44 小浪鼓 阅读(594) 评论(0) 编辑 收藏 举报
Powered by: 博客园 Copyright © 2024 小浪鼓 Powered by .NET 9.0 on Kubernetes