     
     override func viewDidLoad() {
         super.viewDidLoad()
-        self.editorTextView.delegate = self
-        UIButton.appearance().setTitleColor(UIColor.whiteColor(), forState: UIControlState.Normal)
-        editorTextViewMinHeight = Int(self.editorTextViewHeightConstraint.constant) - editorTextViewMargin
+        
+        editorTextView.delegate = self
+        editorTextViewMinHeight = Int(editorTextViewHeightConstraint.constant) - editorTextViewMargin
     }
     
     override func didReceiveMemoryWarning() {

    }
    
    func handleKeyboardWillHideNotification(notification: NSNotification) {
        NSLog("handleKeyboardWillHideNotification")
        
        let userInfo = notification.userInfo!
        let animationDuration: NSTimeInterval = (userInfo[UIKeyboardAnimationDurationUserInfoKey] as NSNumber).doubleValue
        
        self.editorViewButtomConstraint.constant = 0
        
        UIView.animateWithDuration(animationDuration, delay: 0, options: .BeginFromCurrentState, animations: {
            self.editorView.alpha = 0
            self.view.layoutIfNeeded()
        }, completion: {
            (finished: Bool) in
            self.editorView.hidden = true
        })
    }
    
    @IBAction func signInButtonClick(sender: UIButton) {
        NSLog("signInButtonClick")
    }
    
    @IBAction func closeEditorButtonClick(sender: UIButton) {
        
        if (self.editorTextView.isFirstResponder()) {
            self.editorTextView.resignFirstResponder()
        } else {
            self.editorView.hidden = true
        }
    }
    
    @IBAction func writeButtonClick(sender: UIButton) {
        
        if (self.editorView.hidden) {
            self.editorView.hidden = false
            self.editorView.alpha = 0
            self.editorTextView.becomeFirstResponder()
        }
    }
}

    
    func textViewDidChange(textView: UITextView) {
        let height = max(textView.contentSize.height, editorTextViewMinHeight) + editorTextViewMargin
        
        var frame = textView.frame
        frame.size.height = height
        textView.frame = frame
        
        editorTextViewHeightConstraint.constant = height
    }
    
    func handleKeyboardWillShowNotification(notification: NSNotification) {
        let userInfo = notification.userInfo!
        let animationDuration: NSTimeInterval = (userInfo[UIKeyboardAnimationDurationUserInfoKey] as NSNumber).doubleValue
        let keyboardScreenEndFrame = (userInfo[UIKeyboardFrameEndUserInfoKey] as NSValue).CGRectValue()
        
        let orientation: UIInterfaceOrientation = UIApplication.sharedApplication().statusBarOrientation
        if (orientation.isLandscape) {
            editorViewButtomConstraint.constant = keyboardScreenEndFrame.size.width
        } else {
            editorViewButtomConstraint.constant = keyboardScreenEndFrame.size.height
        }
        
        self.view.setNeedsUpdateConstraints()
