If I run the exact same code on MacOS 12.7 (Xcode 14.2) and MacOS 15.0.1 (Xcode 15.0.1).
In a scrollView, I display lines (lineDivider) and then a LazyVgrid, applying some offset:
ScrollView(.vertical) {
ForEach(1...50, id: \.self) { index in
LabelledDivider(label: "\(index)", color: .gray.opacity(0.1))
.offset(y: CGFloat(65*index - 50)
}
LazyVGrid(columns: gridItemLayout, spacing: 33 ) {
ForEach ($allItems.theItems) { $item in
ItemView(item: item)
}
}
.offset(y: 40)
}
In Xcode 14.2, I get the first layout and in Xcode 15.0 the second on right:
The divider line is at the same position, but the view in grid is not.
If I change
.offset(y: 40)
to
.offset(y: 60)
I get the same layout.
So my questions:
- did anyone observe similar change ?
- is it due to Xcode, to MacOS ?
- Is it documented somewhere ?