I think I finally figured out a solution to this annoying problem! 😅 🎉
I created a new separate project with a simplified version of the code only for debugging.
**The solution:**
It turns out that it's possible to wrap the `ScrollView` in a `GeometryReader` which calculates the total window space.
Then I am using the value from the `GeometryReader` to calculate the total height without the header. The header is the blue box that contains the document name and information like word counter.
The calculation is simply `geometry.size.height - headerHeight` and now I have the minHeight value for the `NSTextView`.
It's even a dynamic value that updates when the user resizes the window.
From web development, I'm used to just being able to say `width: 100%` and then it works, but with native development, it's not as easy 😂 #dev #Swift #AppKit


Will look at it again today. Hopefully I can find a solution.
It can’t be this difficult just to get a `NSTextView` to stretch full height inside a `ScrollView`…
View quoted note →
View quoted note →