     public func removeObserver(observer: AnyObject) {
         if let index = self.indexOfObserver(observer) {
             self.observers.removeAtIndex(index)
+            if self.observers.count == 0 {
+                self.onHasObserverChanged?(false)
+            }
         }
     }
     

        }
        return nil
    }
}
        else {
            // since the observer does not already exist, add a new tuple with the
            // observer and an array with the callback
            let oldCount = self.observers.count
            self.observers.append((observer: WeakWrapper(observer), callbacks: [callback]))
            if oldCount == 0 {
                self.onHasObserverChanged?(true)
            }
        }
    }
    
