func textViewContentHeightChange(textView: UITextView) {
DispatchQueue.main.async {
if textView.bounds.size.height > textView.contentSize.height {
var topDeviation = (textView.bounds.size.height - textView.contentSize.height)
topDeviation = topDeviation < 0 ? 0 : topDeviation
textView.contentOffset = CGPoint(x: 0, y: -topDeviation/2)
}
}
}