Proyectos de Subversion Iphone Microlearning - Inconcert

Rev

Rev 1 | Ir a la última revisión | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 1 Rev 19
Línea 41... Línea 41...
41
    
41
    
Línea 42... Línea 42...
42
    }
42
    }
-
 
43
 
Línea 43... Línea 44...
43
 
44
    
-
 
45
    func load() {
44
    
46
        print("ImageLoaderkey: \(key)")
45
    func load() {
47
        
46
        
48
        if imageCache!.cache.hasData(forKey: key) {
-
 
49
 
-
 
50
            do {
-
 
51
                self.image = try imageCache!.cache.readImageForKey(key: key)
-
 
52
                return
47
        if imageCache!.cache.hasData(forKey: key) {
53
            } catch  {
Línea -... Línea 54...
-
 
54
                print("Error cargando la imagen  desde el cache")
-
 
55
            }
48
            print("ImageLoader from cache key : \(key)")
56
    
49
            self.image = imageCache!.cache.readImageForKey(key: key)
57
        }
50
            return
58
        
51
        }
59
        print("Cargando la imagen desde el URL")
52
        
60
        
53
        /*
61
        /*
Línea 54... Línea -...
54
        if let image = cache?[key as NSString] {
-
 
-
 
62
        if let image = cache?[key as NSString] {
Línea 55... Línea 63...
55
            print("ImageLoader from cache key: \(key)")
63
            print("ImageLoader from cache key: \(key)")
Línea 56... Línea 64...
56
            self.image = image
64
            self.image = image