![](/img/trans.png)
[英]How can I get the current index(id) of last visible row in a List or LazyVStack after the user scrolls and reference it after rotation?
我的 UI 中有一個 LazyVStack,在設備旋轉后顯示的行與旋轉前不同。 甚至不接近那些行。 在 SwiftUI 之前,我通過獲取 viewWillTransition 中的最后一個可見行然后在 orientationDidChangeNotification 之后滾動到它來處理這個問題。 ...