Post

Replies

Boosts

Views

Activity

Reply to ScrollView shrink to fit
If you don't mind the bouncing, you can simply do ScrollView { //content } .frame(maxHeight: 300).fixedSize(horizontal: false, vertical: true) This will make the ScrollView fit its content vertically until it grows up to a max height of 300, and it won't grow any bigger afterwards. You can hide the indicator, but unfortunately without some hacking around, you can't easily turn the bounces off when the height is < 300, which is a limitation here.
May ’23