I had a very similar issue. Not quite the same, but I'll let you know what I did in case it's helpful.
I only had one view in my LazyVStack which had a variable height, and it was at the very top. I put the entire LazyVStack inside another VStack, and moved the one with the variable height to the other VStack. This fixed it because everything inside the LazyVStack then had the same height. For example:
ScrollView {
VStack(spacing: 10) {
VariableHeightView()
LazyVStack(spacing: 10) {
ForEach(items) { item in
FixedHeightView()
}
}
}
}
Post
Replies
Boosts
Views
Activity
This is an issue in Xcode restoring its previous sessions. I had a similar problem and solved it by holding shift while launching Xcode 13.
I found this problem as well.
My solution is not very elegant, I'm afriad. I had to be very specific about the types. I moved the columns into their own @TableColumnBuilder with all the generics specified:
@TableColumnBuilder<Weather.State.Row, Never>
private var columns: TupleTableColumnContent<
Weather.State.Row, Never, (
TableColumn<Weather.State.Row, Never, Text, Text>,
TableColumn<Weather.State.Row, Never, Text, Text>,
TableColumn<Weather.State.Row, Never, Text, Text>,
TableColumn<Weather.State.Row, Never, Text, Text>,
TableColumn<Weather.State.Row, Never, Text, Text>,
TableColumn<Weather.State.Row, Never, Text, Text>
)
> {
TableColumn("Local Date/Time", value: \.dateTime)
TableColumn("Temperature", value: \.temp)
TableColumn("Apparent Temperature", value: \.apparentTemp)
TableColumn("Dew Point", value: \.dewPoint)
TableColumn("Humidity", value: \.humidity)
TableColumn("Rain", value: \.rain)
}
Though this is a lot of ugly specificity, it's the type inference that slowing Swift down here.
I was lucky because I don't need a sort comparator (hence the Never above) and all my labels and views are simply Texts.
There may be a way to clean this up further with buildPartialBlock