 
         let convertedBeginKeyboardRect = view.convert(beginKeyboardRect, to: view.window)
         let convertedEndKeyboardRect = view.convert(endKeyboardRect, from: view.window)
-        let convertedFirstResponderView = view.convert(currentFirstResponderView.frame, from: currentFirstResponderView.superview)
+        let convertedFirstResponderRect = getRect(forGivenFirstResponder: currentFirstResponderView, convertedToCoordinatesSystemOf: view)
 
         var insetDifference: CGFloat
         switch type {
-
-        case .Show:
+        case .WillShow, .DidShow: //there should not be situation when for single currentFirstResponder both WillShow and DidShow will be handled here
             saveCurrentContentInset()
             insetDifference = getBottomInsetChangeForKeyboardShown(keyboardRect: endKeyboardRect)
-        case .Change:
+        case .WillChange, .DidChange:
             handlingKeyboardChange = true
             insetDifference = getBottomInsetChangeForKeboardChanged(beginKeyboardRect: beginKeyboardRect, endKeyboardRect: endKeyboardRect)
         }
 
-        let newContentOffset = getNewContentOffset(textFieldRect: convertedFirstResponderView, keyboardRect: endKeyboardRect)
+        let newContentOffset = getNewContentOffset(textFieldRect: convertedFirstResponderRect, keyboardRect: endKeyboardRect)
 
         performAnimation(withDuration: duration.doubleValue, andOptions: UIViewAnimationOptions(rawValue: animationCurve.uintValue), insetDifference: insetDifference, newContentOffset: newContentOffset, completion: { [weak self] in
 
             self?.lastKeyboardHeightAfterChange = endKeyboardRect.height
 
             switch type {
-            case .Show:
+            case .WillShow, .DidShow:
                 self?.keyboardIsShown = true
-            case .Change:
+            case .WillChange, .DidChange:
                 self?.handlingKeyboardChange = false
             }
         })

            }, completion: { _ in completion() })
    }

    private func saveCurrentContentInset() {
        if let tableView = tableView {
            initialContentInset = tableView.contentInset

        }
    }

    //private func getRect(from)

    private func getBottomInsetChangeForKeboardChanged(beginKeyboardRect: CGRect, endKeyboardRect: CGRect) -> CGFloat {
        var keyboardHeightDifference: CGFloat
        let endKbHeight = endKeyboardRect.height
