     var text = "" {
         didSet {
             textView.text = text
+            
             updateContentSize()
-            scrollToBottom()
-        }
-    }
+            if autoFollow {
+                scrollToBottom()
+            }
+        }
+    }
+    
+    private var shouldForwardTouches = false
+    private var autoFollow = true
+    
+    // MARK: - Init
+    
+    required init?(coder aDecoder: NSCoder) {
+        super.init(coder: aDecoder)
+        commonInit()
+    }
+    
+    override init(frame: CGRect) {
+        super.init(frame: frame)
+        commonInit()
+    }
+    
+    private func commonInit() {
+        configureUI()
+    }
+    
+    // MARK: - Actions
+    
+    func settingsButtonTapped(sender: UIButton) {
+        toggleToolbar()
+    }
+    
+    func touchButtonTapped(sender: UIButton) {
+        touchButton.selected = !touchButton.selected
+        shouldForwardTouches = !shouldForwardTouches
+    }
+    
+    func followButtonTapped(sender: UIButton) {
+        followButton.selected = !followButton.selected
+        autoFollow = !autoFollow
+    }
+    
+    func clearButtonTapped(sender: UIButton) {
+        text = ""
+    }
+    
+    func closeGestureRecognized(sender: UITapGestureRecognizer) {
+        toggleUI()
+    }
+    
+    // MARK: - Helpers
     
     private func updateContentSize() {
         let size = (text as NSString).sizeWithAttributes([NSFontAttributeName: textView.font!])

    private let textView = UITextView()
    
    private let toolbar = UIView()
    private let settingsButton = UIButton()
    private let `switch` = UISwitch()
    private let clearButton = UIButton()
    
    private let closeGesture = UITapGestureRecognizer()

    private var toolbarConstraints: [NSLayoutConstraint]? {
        guard let
        width = toolbar.widthAnchor.constraintEqualToConstant(320),
        height = toolbar.heightAnchor.constraintEqualToConstant(50),
        centerY = toolbar.centerYAnchor.constraintEqualToAnchor(centerYAnchor)
            else { return nil }
        return [width, height, toolbarLeadingConstraint, centerY]
    }
    
    private var toolbarStackConstraints: [NSLayoutConstraint]? {
        guard let
            leading = toolbarStack.leadingAnchor.constraintEqualToAnchor(toolbar.leadingAnchor),
            trailing = toolbarStack.trailingAnchor.constraintEqualToAnchor(toolbar.trailingAnchor, constant: -20),
            top = toolbarStack.topAnchor.constraintEqualToAnchor(toolbar.topAnchor),
            bottom = toolbarStack.bottomAnchor.constraintEqualToAnchor(toolbar.bottomAnchor)
            else { return nil }
        return [leading, trailing, top, bottom]
    }
    
    // MARK: - Override
