QGrid
QGrid copied to clipboard
Warning on macOS: Invalid frame dimension (negative or non-finite)
On macOS 11.1, when a View is loaded for the first time, the size obtained by GeometryReader is incorrect, resulting in a negative frame value, causing this warning. The real size can only be obtained the second time, as shown in the screenshot.
Same on tvOS
try this, it works for me ~
.frame(width:abs(self.contentWidthFor(geometry)))