0

I have a SwiftUI modal view that consists of a scroll view, and implements the scrollTo functionality perfectly the first time it is presented.

The functionality breaks all subsequent times it is presented.

Any reason why this behavior may be happening? SwiftUI views are struct so every presentation must be fresh / starting with the same state. It is presented using fullScreenCover.

David Baez
  • 1,208
  • 1
  • 14
  • 26
  • 3
    Would you show your code? – Asperi Jan 02 '21 at 06:57
  • Is this in the simulator only? Have you tried running it on a device? – Peter F. Jan 02 '21 at 09:04
  • Yes I am testing on a Physical device. And I’m away from my laptop so I’ll upload some code as soon as I’m on it. My concern is that, shouldn’t this scenario be impossible? My view has no dependencies and no way of having the state carry over to the next presentation, so why would it behave perfectly the first time, and then break, shouldn’t the same behavior each time be practically guaranteed? – David Baez Jan 02 '21 at 14:27

0 Answers0