         
         let count = urls.count
         var loadedCount :Int = 0
+        var tmpImageInformationDic = [Int : CKImageInformation]()
         for url in urls {
             let backendSize = self.sizeByURLBlock!(url)
             if  backendSize == CGSize.zero {

        // Dispose of any resources that can be recreated.
    }
    
    func calculateSize() {
        var sampleSize = CGSize.zero
        for  (_, inform) in self.imageInformationDic {
            if inform.size.height > inform.size.width {

            else {
                let imageInfo = CKImageInformation(url: url, size: backendSize, orientation: .up)
                let index = self.imageUrls.index(of: url)
                tmpImageInformationDic[index!] = imageInfo
                loadedCount += 1
                
                if loadedCount == count {
                    self.calculateSize(imageInformDic: tmpImageInformationDic)
                }
            }
        }
