AlamofireSource不会加载图像

时间:2017-05-18 12:00:22

标签: swift xcode swift3

我想使用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不起作用?

0 个答案:

没有答案