nathantannar4 / InputBarAccessoryView

A simple and easily customizable InputAccessoryView for making powerful input bars with autocomplete and attachments
MIT License
1.15k stars 229 forks source link

Custom middleContentView height is not considered #264

Open PhilipDukhov opened 1 month ago

PhilipDukhov commented 1 month ago

I'm using a custom middleContentView view that has inputTextView as a child, as well as an additional view (red in the image below) that increases the height.

I can't place it in the top stack because I'm using left stack, the text view needs to be aligned with the red view.

Group 2

The problem is that calculateIntrinsicContentSize doesn't check the height of middleContentView in any way and expects it to be the size of inputTextView. I think this function needs to be updated to fix this.

https://github.com/nathantannar4/InputBarAccessoryView/blob/093bdc71dc26bfcdaa71352d5ff0cd84b9b8d427/Sources/InputBarAccessoryView.swift#L569-L595