         waveSamples = [CGFloat]()
     }
     
+    override func didMoveToSuperview() {
+        super.didMoveToSuperview()
+        self.presented = true
+    }
+    
+    override func removeFromSuperview() {
+        super.removeFromSuperview()
+        self.presented = false
+    }
     /*
     // Only override drawRect: if you perform custom drawing.
     // An empty implementation adversely affects performance during animation.

    
    private var phase: CGFloat = 0
    
    var level: CGFloat! {
        didSet {
            self.phase+=self.phaseShift; // Move the wave

    }
    
    func callbackWaver() {
        if presented {
            waverCallback!(waver: self)
        }
    }
    
    private func updateMeters() {
