         }
     }
     
-    func keyboardWillShow() {
+    func keyboardWillShow(notification: NSNotification) {
+        if let userInfo = notification.userInfo {
+            if let keyboardSize = (userInfo[UIKeyboardFrameBeginUserInfoKey] as? NSValue)?.CGRectValue() {
+                self.kOFFSET_FOR_KEYBOARD = keyboardSize.height
+            }
+        }
+        
         if self.view.frame.origin.y >= 0 {
             self.setViewMovedUp(true)
         } else if self.view.frame.origin.y < 0 {

        }
    }
    
    func keyboardWillHide() {
        if self.view.frame.origin.y >= 0 {
            self.setViewMovedUp(true)
        } else if self.view.frame.origin.y < 0 {

        
        self.textViewTest = UITextView(frame: CGRectMake(0, self.view.bounds.height - 200, self.view.bounds.width, 200))
        self.textViewTest?.backgroundColor = UIColor.grayColor()
        self.textViewTest?.layer.borderColor = UIColor.redColor().CGColor
        self.textViewTest?.layer.borderWidth = 1.0
        self.view.addSubview(self.textViewTest!)
        self.textViewTest!.delegate = self
        
