我想使用AlamofireSource
加载我的图片。
var images = [InputSource]()
for img in arr_imgs
{
if(img != "")
{
var mimg = img.replacingOccurrences(of: "\\", with: "/", options: .literal, range: nil)
print("==> \(mimg)")
if let alamofireSource = AlamofireSource(urlString: mimg)
{
images.append(alamofireSource)
}
else {
print("it doesnt work")
}
}
}
控制台日志:
==> http://kashanmap.ir/media/k2/galleries/6881/1.jpg
it doesnt work
==> http://kashanmap.ir/media/k2/galleries/6881/2.jpg
it doesnt work
==> http://kashanmap.ir/media/k2/galleries/6881/3.jpg
it doesnt work
==> http://kashanmap.ir/media/k2/galleries/6881/4.jpg
it doesnt work
==> http://kashanmap.ir/media/k2/galleries/6881/5.jpg
it doesn't work
为什么AlomofireSource
不起作用?