我的代码是这样......获得目标C
NSString *str=[arrInitiatives valueForKey:@"FileName"];
NSLog(@"file name ----> %@",str);
NSString *imageUrl = [NSString stringWithFormat:@"%@%@", PUBLIC_UTILITY_FORMS_URL,str];
NSLog(@"----> %@",imageUrl);
[_image_imageview setImageWithURL:[NSURL URLWithString:imageUrl] placeholderImage:[UIImage imageNamed:@"noimage.png"]];
//http://setupolice.org/brcsetu/UploadFile/Lighthouse4908.jpg
从字符串数组简单的值,我会得到这个
file name ----> (
"Lighthouse4908.jpg"
)
----> http://setupolice.org/brcsetu/UploadFile/(
"Lighthouse4908.jpg"
)
I want this
----> http://setupolice.org/brcsetu/UploadFile/Lighthouse4908.jpg
检查NSString类文档,他们有方法来告诉路径扩展名和文件名等 – Shubhank