Open AndrewSB opened 3 years ago
Are you expecting the height to be dynamic? You should be able to set a height constraint on your scroll view to get it to appear.
Overriding the middle content is more of a hack that many had just requested. There could be issues.
ahh got it, I must be running up against those hacks. yes, the height is dynamic; the text field acts just like the default middleContentView
, it breaks to become multiline as text is entered.
what constraint are you thinking? one that I invalidate & re-calculate by adding textView.frame.height + collectionViewHeightConstant100
each time my textViewDidChange
, or something else? I'll give it a shot this week
I thought you said the height was constant? Try giving the scroll view a height constraint.
Hey! I’m trying to add a constant height UICollectionView (that scrolls inline with the text) into the
middleContentView
of my input bar, but I'm confused on how to communicate the new height.My new view is basically
I've tried a couple things with constraints, and overridding
calculateIntrinsicContentSize
, but no matter what I do the height of the bar stays the initial 1-line-tall height. I imagine it's because my scroll view doesn't communicate it's height to the library properly. is there an expected way to override this? or wassetMiddleContentView
written only with constant height views (like the button, in the example project) in mind?