I'm trying to adjust the inputAccessoryView
height base on the UITextView
inside the inputAccessoryView
view just like iOS Native Message App. I'm able to adjust the hight of UITextView but can't make the inputAccessoryView
to change the hight according to UITextView
line. How is this possible in Swift?
UITextView Hight Adjustment:
func textViewDidChange(textView: UITextView) {
var frame: CGRect = MessageField.frame
frame.size = MessageField.contentSize
MessageField.frame = frame
}
I have read some QA in stack overflow but non of them seems to be working for me, I have tried the autoresizingMask
[Flexible Hight], QA1, QA2.
Current Situation: The UITextView resize hight, but not the input accessory.