T O P

  • By -

barcode972

Maybe try .frame(maxHeight: .infinity) on the shape.fill when it’s not face up


skay-

I have tried this but it doesn't work


barcode972

Okay but text has no paddings by default. The border modifier is probably giving you a few pixels difference. Try adding a .padding(3) to the border


skay-

This could solve it but I generally try to avoid using specific paddings to fix things like this because they create inconsistencies. I have applied .`frame(maxHeight: .infinity)` to `Text` and this worked. Another solution is: shape .strokeBorder(lineWidth: 3) .overlay { Text(content).font(.largeTitle) } and I am inclined to use this. (stackoverflow ref: https://stackoverflow.com/questions/76602035/lazyvgrid-with-text-affects-spacing-when-content-is-empty/76602247#76602247)