             StartDisplay()
         }
     }
-    
+
     public func StartDisplay(){
         self.displaying = true
         CheckCache()
     }
-    
+
     public func StopDisplay(){
         self.displaying = false
         CheckCache()
     }
-    
+
     public func CheckCache(){
-        if(self.animationManager.CheckForCache(self)==true && self.haveCache==false){
+        if(self.animationManager?.CheckForCache(self)==true && self.haveCache==false){
             prepareCache()
             self.haveCache = true
         }
-        else if(self.animationManager.CheckForCache(self)==false && self.haveCache==true){
+        else if(self.animationManager?.CheckForCache(self)==false && self.haveCache==true){
             self.cache.removeAllObjects()
             self.haveCache = false
         }
     }
-    
+
     public func updateCurrentImage(){
         if(self.displaying == true){
             if(self.haveCache==false){

            self.cache.setObject(image,forKey:i)
        }
    }
    
    public var gifImage:UIImage{
        get {
            return (objc_getAssociatedObject(self, _gifImageKey) as! UIImage)

            objc_setAssociatedObject(self, _gifImageKey, newValue, objc_AssociationPolicy.OBJC_ASSOCIATION_RETAIN);
        }
    }
    public var currentImage:UIImage{
        get {
            return (objc_getAssociatedObject(self, _currentImageKey) as! UIImage)
        }
