Post

Replies

Boosts

Views

Activity

Reply to Offset on tap items when reopening app with a sheet open
As my observing, it seems that the view which is covered by a sheet is "re-measured then cached" after awakening from the background state. And because it is covered by the sheet, its size shrinks so all of its subviews are in a wrong sized container. I've tried to set a @State var inside the covered view to trigger another re-creating, but it's not working. The re-measured size seems being cached somewhere for performance. As the other posts said, keyboard may trigger the size re-calculation, and I also found that when the bug occurred, without showing a sheet, press the side button(power button) to put the app into the background then resume it, the view could be re-measured into the correct size again. Also, the bug could be only triggered by resuming the app from the BACKGROUND state, INACTIVE state(press side button twice in a short period) does not trigger the bug. I think the view should be taken snapshot for both "normal state" and "shrunk state" after awakening from the background. But anyway, this bug is really annoying :(
Mar ’23