 
 import UIKit
 
-class OKSGutteredCodeView: UIView, UITextViewDelegate {
+class OKSGutteredCodeView: UIView, UITextViewDelegate, UIScrollViewDelegate {
 
     @IBOutlet weak var gutterView: UIScrollView!
     @IBOutlet weak var textView: UITextView!

        self.addNumberToGutter()
    }
    
    //MARK sorting out number and location of lines
    
    func countNumberOfLines() -> Int {

        let text = self.textView.text
        let seperatedLines = text.componentsSeparatedByString("\n")
        var numberInsertionPoint: CGFloat = 0
        self.gutterView.contentSize = self.gutterView.frame.size
        var counter: Int = 1
        for line in seperatedLines {
            let label: UILabel = UILabel(frame: CGRectMake(0, numberInsertionPoint, 30, self.textView.font!.lineHeight))
