         let lineHeight = line.boundingRectWithSize(CGSizeMake(textViewWidth, CGFloat.max), options: .UsesLineFragmentOrigin, attributes: [NSFontAttributeName : font], context: nil).height
         return lineHeight
     }
+    
+    //MARK KVO methods
+    
+    override func observeValueForKeyPath(keyPath: String?, ofObject object: AnyObject?, change: [String : AnyObject]?, context: UnsafeMutablePointer<Void>) {
+        if keyPath != nil && keyPath == "bounds" && (object?.isEqual(self))! {
+            performSelector(#selector(textViewDidChange), withObject: self.textView, afterDelay: 0.5)
+        }
+    }
 }
        
        super.init(coder: aDecoder)
        xibSetUp()
    }
    
    func setGutterBackgroundColor(color: UIColor) {

        
        super.init(frame: frame)
        xibSetUp()
        self.addObserver(self, forKeyPath: "bounds", options: .Initial, context: nil)
        self.textViewDidChange(self.textView)
    }
    
    required init?(coder aDecoder: NSCoder) {
